Skip to content

Instantly share code, notes, and snippets.

Chris Saylor cjsaylor

Block or report user

Report or block cjsaylor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View osx-for-hackers.sh
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
View keybase.md

Keybase proof

I hereby claim:

  • I am cjsaylor on github.
  • I am cjsaylor (https://keybase.io/cjsaylor) on keybase.
  • I have a public key whose fingerprint is F626 B810 0C5D 5A96 294A E24E 9F35 46F7 FA81 2DC5

To claim this, I am signing this object:

View scrolltab_example.js
$('#content').scrolltab({
hoverin: function() {
$(this).stop().animate({width: '200px'}, 500);
},
hoverout: function() {
$(this).stop().animate({width: '50px'}, 500);
},
classname: 'scrolltab-content',
title: 'Content'
});
@cjsaylor
cjsaylor / qr_bookmarklet.js
Created Nov 17, 2010
QR Bookmarklet that opens an external window with the QR code of either selected text or the current URL
View qr_bookmarklet.js
javascript:(function() {
window.open('http://chart.apis.google.com/chart?cht=qr&chs=250x250&chl='+encodeURIComponent(getSelection().toString() || window.location.href)+'&chld=H|0', 'QR Window','location=0,status=0,scrollbars=0,toolbar=0,menubar=0,directories=0,resizable=0,width=250,height=250');
})();
View g_chart_example.php
<?php
$data = array(
'labels' => array(
array('string' => 'Sample'),
array('number' => 'Piston 1'),
array('number' => 'Piston 2')
),
'data' => array(
array('S1', 74.01, 74.03),
@cjsaylor
cjsaylor / .htaccess
Created Jun 15, 2011
Subdomain vhost_alias
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
<rewrite rules here>
</IfModule>
@cjsaylor
cjsaylor / hack.sh
Created Apr 1, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/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
#
@cjsaylor
cjsaylor / gist:3246834
Created Aug 3, 2012 — forked from fxsjy/gist:3244607
Simple Memcached server in Javascript with 100 lines of code
View gist:3246834
/* Simple Memcached in Javascript
* @Author: Sun, Junyi
* @Email: ccnusjy@gmail.com
* @Date: 2012-8-3
*/
var net = require('net');
var store = {}
function handle_header(header,crlf_len){
var tup = header.split(" ")
View application_bootstrap.php
<?php
use \Zumba\Symbiosis\Plugin\PluginManager;
// Somewhere in your application bootstrap, load your plugins
PluginManager::loadPlugins(
'/path/to/your/plugin/directory', // Path to where you stored your plugins
'YourApp\Plugin' // namespace defined in your plugins (see example above)
);
@cjsaylor
cjsaylor / app.js
Created Oct 17, 2012
Bootstrap Modal with Remote Source
View app.js
$(document).ready(function() {
$(document).on('.ajaxModal', 'click', function(event) {
$.get($(this).attr('href'), function(response) {
$('<div class="modal hide fade">' + response + '</div>').modal();
});
event.preventDefault();
});
});
You can’t perform that action at this time.