Skip to content

Instantly share code, notes, and snippets.

View victusfate's full-sized avatar
🚀

Mark Essel victusfate

🚀
View GitHub Profile
@bergie
bergie / README.md
Created May 18, 2011 11:33
Falsy Values tutorials
@victusfate
victusfate / Excel.php
Created April 25, 2011 22:04 — forked from ihumanable/Excel.php
Simple Excel Writer in PHP
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @license Unlicensed
* @version 1.0
*/
class Excel {
private $col;
javascript: (function () {
var n = null,
C = false;
function h(m) {
d(m, "jsgif_overlaid");
m.removeEventListener("click", i, C)
}
function i(m) {
var o = this;
@roryokane
roryokane / jsgif.js
Created April 4, 2011 14:43
http://slbkbs.org/jsgif/ bookmarklet automatically beautified by http://jsbeautifier.org/
javascript: (function () {
var n = null,
C = false;
function h(m) {
d(m, "jsgif_overlaid");
m.removeEventListener("click", i, C)
}
function i(m) {
var o = this;
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload=loadDeps;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
} else {
loadDeps();
}
function loadDeps() {
@igrigorik
igrigorik / ruby-1.9-tips.rb
Created February 3, 2011 17:19
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@max-mapper
max-mapper / chicago-inspections.rb
Created December 3, 2010 22:49
chicago restaurant health inspections
require 'net/http'
require 'uri'
require 'nokogiri'
url = URI.parse('http://webapps.cityofchicago.org/healthinspection/inspectionresultrow.jsp')
request = Net::HTTP::Post.new(url.path)
request.set_form_data({"REST"=>" ", "STR_NBR"=>"", "STR_NBR2"=>"", "STR_DIRECTION"=>"", "STR_NM"=>"", "ZIP"=>""})
@victusfate
victusfate / webapp.rb
Created November 16, 2010 20:45 — forked from igrigorik/webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
@subtleGradient
subtleGradient / appify
Created November 11, 2010 16:03
appify. Create the simplest possible mac app from a shell script
#!/usr/bin/env bash
#
# url : https://gist.github.com/672684
# version : 2.0.2
# name : appify
# description : Create the simplest possible mac app from a shell script.
# usage : cat my-script.sh | appify MyApp
# platform : Mac OS X
# author : Thomas Aylott <[email protected]>
@shripadk
shripadk / gist:652819
Created October 29, 2010 03:10
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'