Skip to content

Instantly share code, notes, and snippets.

View endel's full-sized avatar

Endel Dreyer endel

View GitHub Profile
@troex
troex / unicorn.sh
Created April 4, 2011 20:57
Unicorn start/stop/restart script for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs mysql
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: unicorn initscript
# Description: Unicorn is an HTTP server for Rack application
### END INIT INFO
@tommeier
tommeier / xvfb_daemon.sh
Created April 27, 2011 10:44
Xvfb startup init script for headless selenium with multiple displays for Jenkins or Teamcity CI server
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
# Example Use:
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@guewen
guewen / magento_api.rb
Last active February 23, 2016 13:59
Magento API simple client in Ruby
# Copyright Camptocamp SA 2012
# License: AGPL (GNU Affero General Public License)[http://www.gnu.org/licenses/agpl-3.0.txt]
# Author Guewen Baconnier
require "xmlrpc/client"
require 'pp'
XMLRPC::Config::ENABLE_NIL_PARSER = true
XMLRPC::Config::ENABLE_NIL_CREATE = true
class MagentoAPI
@txus
txus / Readme.md
Created March 11, 2012 17:19
RubyScript - A transcompiler transforming a subset of Ruby to JavaScript

RubyScript

A ~400LOC transcompiler transforming a subset of Ruby to JavaScript.

Installing and usage

curl https://raw.github.com/gist/2017173/efebd33d6ff430347ddb953c587318c8934cfd1e/rubyscript.rb > rubyscript
chmod +x rubyscript
./rubyscript my_file.rb > my_file.js
@hagino3000
hagino3000 / method_missing.js
Last active January 16, 2020 13:11
__noSuchMethod__ for Chrome
/**
* Enable route to __noSuchMethod__ when unknown method calling.
*
* @param {Object} obj Target object.
* @return {Object}
*/
function enableMethodMissing(obj) {
var functionHandler = createBaseHandler({});
functionHandler.get = function(receiver, name) {
@justinbmeyer
justinbmeyer / fastfix.js
Created April 13, 2012 14:17
Makes jQuery.event.fix fast
(function(){
var set = function(obj, prop, val){
Object.defineProperty(obj,prop,{
value : val
})
return val;
};
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@endel
endel / gist:3623976
Created September 4, 2012 17:40 — forked from emerleite/gist:3621544
Velocity 2012 - Anotações
http://estelle.github.com/mobileperf/#slide55
https://github.com/impressiver/velocity2012
https://github.com/jonlives/velocity_resources
Chef - Jon Cowie (Etsy)
Ele tem um handler que consegue mandar o que falha para or irc usando