Skip to content

Instantly share code, notes, and snippets.

View ericcholis's full-sized avatar

Eric Cholis ericcholis

View GitHub Profile
@ericcholis
ericcholis / dnsmasq OS X.md
Last active October 19, 2023 16:21 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@ericcholis
ericcholis / mov2gif
Last active August 29, 2015 14:17 — forked from artursapek/mov2gif
#!/bin/bash
# mov2giv in out width
# mov2gif video_file_in.mov gif_file_out.gif 300
tmp_dir=/tmp/frames_$(date +%s)
mkdir $tmp_dir
if [ -z "$3" ]
then
size=600
<?php
use lithium\action\Dispatcher;
use lithium\storage\Session;
use lithium\security\validation\RequestToken;
use lithium\action\Response;
Dispatcher::applyFilter('run', function($self, $params, $chain) {
$request = $params['request'];
import os, sys
import datetime
import base64
import cloudservers
import cloudlb
import urllib2
#import paramiko
from time import sleep
@ericcholis
ericcholis / reveal_ajax.js
Created October 23, 2012 12:01 — forked from jeduan/reveal_ajax.js
Use Zurb reveal with ajax
$('a.reveal').click(function(event) {
event.preventDefault();
var $div = $('<div>').addClass('reveal-modal').appendTo('body'),
$this = $(this);
$.get($this.attr('href'), function(data) {
return $div.empty().html(data).append('<a class="close-reveal-modal">&#215;</a>').reveal();
});
});
@ericcholis
ericcholis / object-watch.js
Created October 27, 2011 13:02 — forked from eligrey/object-watch.js
Cross-browser object.watch and unwatch. Modified for use with MooTools and MooTools More
// Cross-browser object.watch and object.unwatch
// Requires Mootools 1.4 or greater
// object.watch
(function(){
if (!Object.prototype.watch) {
Object.implement('watch',function(prop,handler){
var oldval = this[prop], newval = oldval,
getter = function () {
return newval;