Skip to content

Instantly share code, notes, and snippets.

View ericterpstra's full-sized avatar

Eric Terpstra ericterpstra

  • Methodist Le Bonheur Healthcare
  • Fairfax, VA
  • 09:19 (UTC -04:00)
View GitHub Profile
@aemkei
aemkei / LICENSE.txt
Created October 27, 2011 17:16 — forked from 140bytes/LICENSE.txt
Lorenz Attractor - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<?php
/**
* @file
*
* Generates a command XML file for PHPStorm/WebStorm/IntelliJ IDEs
* that provides integration with Drush
*/
/**
@jeffthink
jeffthink / index.html
Created January 18, 2012 03:31
Simple d3 Radar Chart
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Simple Radar Chart</title>
<link rel="stylesheet" href="style.css"/>
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<script src="radar.js"></script>
</head><body><h1>Simple Radar Chart</h1>
<div id="viz">
</div>
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jaboc83
jaboc83 / sigPadCompression.js
Last active May 3, 2021 16:01
jQuery Signature Pad Compression/Decompression algorithm
/** Reinflates a compressed signature string:
resolution = a representation of the resolution in
pixels of the canvas which this signature will be drawn
e.g. {x:800,y:200}
*/
var inflateToJsonSignature = function (deflatedSig, resolution) {
var components = [],
modifier = 1,
compressWithResolution = /^(?:\[(\d+)x(\d+)\])?([\w\W]*)/,
parsedSigString = deflatedSig.match(compressWithResolution),
@zhouming
zhouming / MY_Session.php
Created September 8, 2012 05:51
Use redis in Codeigniter Session.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session{
private $sess_use_redis = TRUE;
private $redis = '';
public function __construct($params = array()) {
//parent::__construct();
$this->CI =& get_instance();
add_filter( 'image_send_to_editor', 'tiny_force_caption', 100 );
function tiny_force_caption( $html ) {
$a = strpos($html, 'caption');
if ($a!=1) {
preg_match('/(alignnone|alignleft|alignright|aligncenter)/', $html,$c);
preg_match('/width="(\d*)"/', $html,$w);
preg_match('/alt="([^"]*)"/', $html,$m);
preg_match('/wp-image-(\d*)"/', $html,$n);
if (!isset($n[1])) $n[1] = '0';
$html = '[caption id="attachment_'.$n[1].'" align="'.($c?$c[1]:'alignnone').'" width="'.$w[1].'"]'.$html." &copy; ".get_bloginfo('title')."[/caption]";
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@plentz
plentz / nginx.conf
Last active July 25, 2024 09:38
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048