Press enter to see results or esc to cancel.

Abraham Garcia 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 display form errors. --> <div

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Friday, November 8 2019

How to Select all Text in a Input Box with One Click

Use OnClick to Select all text in a textbox to copy and paste fast. Useful for developers that need sharable links.

This is a code snippet to select all text in a textbox with javascript.  <input onClick="this.select();" value="Sample Text" /> or <input onClick="this.setSelectionRange(0, this.value.length)" value="Sample Text" />  

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Friday, October 11 2019

How to Autoplay a Video Via jQuery Video HTML MP4

Learn How to AutoPlay a HTML5 Video Through jQuery. Simple One Line Code.

Learn How to AutoPlay your HTML5 Video via jQuery Snippet.  $("#video_player")[0].play(); or $("#video_player")[0].autoplay = true;

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, October 4 2019

Sample CURL POST PHP Example Code Snippet

A Sample CURL POST PHP Example to Get Started with Simple API Calls.

This is a short snippet to get started with PHP CURL. Use this to call API in GET, POST, ETC... <?php // // A very simple PHP example that sends a HTTP POST to a remote site // $ch = curl_init(); curl_setopt($ch,

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Thursday, September 26 2019

How to Get Product Summary ClickFunnels for Tracking on Facebook Pixel or Google

A Snippet to pass order value to facebook from clickfunnels confirmation screen.

How to get order total of clickfunnel summary at the end of the funnel. This script loops all the elements with the amount class and adds them. It then creates a variable to pass on to the facebook event. We named the variable myOrderTotal

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, September 20 2019

Create a Folder if it does not exists in PHP

This is a short snippet on how to create a folder via php when it does not exits.

This is a short snippet on how to create a folder via php when it does not exits.  if (!file_exists('path/to/directory')) { mkdir('path/to/directory', 0777, true); }

Continue reading
Abraham Garcia 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");

Continue reading
How to Install Mailtrain in Ubuntu with Docker
Abraham Garcia 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

Continue reading
Abraham Garcia 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 to fill Name, Tags, Command, Reuse Previous

Continue reading
Best JS Notifications Plugin Library - NOTY
Abraham Garcia Abraham Garcia in Javascript/jQuery   Thursday, August 22 2019

Best JS Notifications Plugin Library - NOTY

A Depedency-Free Notifications Library.

This is a library for JS Notificications on the Fly. It is super simple to install and use.  For Installation <link href="lib/noty.css" rel="stylesheet"> <script src="lib/noty.js" type="text/javascript"></script> Create a

Continue reading