Abraham Garcia in Javascript/jQuery   Monday, November 25 2019

Remove All Matching Classes From Page jQuery

How to Remove All Classes from HTML DOM. This matches for similar classes and removes them.

This is a small snippet on how to remove all classes from matched class on jQuery.  $('#builder [class*="ui-id-"]').removeClass(function(i, j) { return j.match(/ui-id-/g).join(" "); }); Full Documentation: https://stackoverflow.com/questions/17691932/jquery-remove-all-matching-classes

Continue reading
Abraham Garcia in Javascript/jQuery   Saturday, November 16 2019

Stripe New JS Button Example

This is the New Stripe JS Integration with PHP. I had not done this in a while so it was a little hard getting integrated, but it was fun.

These are the code snippets to get started with the New Stripe JS Button. HTML <div id="card-element"> <!-- A Stripe Element will be inserted here. --> </div> <!-- Used to

Continue reading
Abraham Garcia in PHP Scripts   Thursday, September 12 2019

Enable CORS on CodeIgniter Controller PHP

How to Enable CORS on CodeIgniter Controller PHP. Learn with a Simple Constructor Method for your PHP Controller.

This is a Short Snippet for Code Igniter to Enable CORS on Controller.  public function __construct() { header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE"); parent::__construct(); }

Continue reading
Abraham Garcia in Fun Stuff   Thursday, September 5 2019

How to Install Mailtrain in Ubuntu with Docker

Mailtrain an OpenSource Self Hosted Newsletter Application. Simple to Use and Easy to Install. Follow Line By Line to Install in Ubuntu with Docker.

Learn How to Install Mailtrain in Ubuntu in a couple of steps via command line.  sudo nano /etc/apt/sources.list.d/docker.list deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add

Continue reading
Abraham Garcia in Fun Stuff   Thursday, August 29 2019

Set a Fixed SSH for iTerm

Login Fast to Your Server without the Need to Always type the SSH Command.

This is a short tutorial on how to setup a fast ssh iterm profile.  1) First Click on Preferences for iTerm. 2) After fill the information required.  You are required

Continue reading