Skip to content

Instantly share code, notes, and snippets.

View tlongren's full-sized avatar
🎯
Focusing

Tyler Longren tlongren

🎯
Focusing
View GitHub Profile
@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@dharFr
dharFr / jquery.pinger-0.2.js
Created July 26, 2011 15:43
$.pinger : jQuery plugin for ping-URL process
/**
* $.pinger
*
* If your page runs into an iframe hosted by another domain, you may want to keep the session open.
* This plugin automates the "ping URL" process and provides some options.
*
* The pinger will ask the given URL every 'interval' minutes if it detects
* some activity by listening to the events listed in 'listen' parameter.
*
* Have a look to the 'defaults' variable below for further details about available parameters and default values.
@paulmillr
paulmillr / dart.md
Last active July 15, 2023 13:36
Leaked internal google dart email

---------- Forwarded message ----------

From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
@vshvedov
vshvedov / gist:1370650
Created November 16, 2011 17:00
Sublime Text Edit 2 for Debian (from PPA)
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository
sudo chmod o+x /usr/sbin/add-apt-repository
sudo chown root:root /usr/sbin/add-apt-repository
sudo add-apt-repository ppa:webupd8team/sublime-text-2
@siddarth
siddarth / gist:1379771
Created November 20, 2011 03:32
Stripe PHP simple example with amount
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("STRIPE_API_KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@thefuxia
thefuxia / defer-cf7-scripts.php
Last active March 21, 2021 20:59
Plugin: Defer Contact Form 7 Scripts
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Defer Contact Form 7 Scripts
* Description: Adds <code>defer='defer'</code> to enqueued javascripts.
* Version: 1.0
* Required: 3.3
* Author: Fuxia Scholz
* Author URI: https://fuxia.me
* License: GPL
* License URI: http://www.gnu.org/copyleft/gpl.html
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@boucher
boucher / webhook-mailer.php
Created January 31, 2012 01:45
Stripe Webhook PHP Example
<?php
// SETUP:
// 1. Customize all the settings (stripe api key, email settings, email text)
// 2. Put this code somewhere where it's accessible by a URL on your server.
// 3. Add the URL of that location to the settings at https://manage.stripe.com/#account/webhooks
// 4. Have fun!
// set your secret key: remember to change this to your live secret key in production
// see your keys here https://manage.stripe.com/account
@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@ashfame
ashfame / local-config-awesome-wp-config-file.php
Created February 27, 2012 13:34
Local config file to hold db credentials and for defining keys & salts along with the use of awesome wp-config.php file
<?php
/**
* WordPress config file to use one directory above WordPress root, when awesome version of wp-config.php is in use.
*
* Awesome wp-config.php file - https://gist.github.com/1923821
*/
/* WordPress Local Environment DB credentials */