Skip to content

Instantly share code, notes, and snippets.

View matiskay's full-sized avatar

Edgar Marca matiskay

View GitHub Profile
#!/bin/bash
BOLD="\033[1m"
_BOLD="\033[22m"
RED="\033[31m"
YELLOW="\033[33m"
GREEN="\033[32m"
RESET="\033[39m"
range=$1
@matiskay
matiskay / jsconf-eu-2011.md
Created October 7, 2011 15:20 — forked from mattpodwysocki/jsconf-eu-2011.md
JSConf.EU Slides
function setSeat(e, handler) {
e.preventDefault();
$('.selected').removeClass('selected').click(handler);
$(e.target).addClass('selected').unbind('click', handler);
$('#seatSelected').text($(e.target).data('seat'));
}
function selectFirstClass(e) {
setSeat(e, selectFirstClass);
var resulting_html = fetchFirstClassConfirm();
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@matiskay
matiskay / README.md
Created December 29, 2011 21:24 — forked from lenary/partials.rb
Partials on Sinatra + Haml

Partials on Sinatra + Haml

This is the haml version. If you want to use the same with erb just change haml to erb.

How to use it

  • Create you partial form example _form.haml (The underscore at the beginning is really important).
  • In you .haml file just write = partial("form").
@matiskay
matiskay / Gemfile
Created January 4, 2012 17:54 — forked from vangberg/README
Deploying a Sinatra app to Heroku
source 'http://rubygems.org'
gem 'sinatra'
gem 'dm'
require 'rubygems'
require 'oauth'
require 'yaml'
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
def get_access_token
p "get_access_token: Initializing Consumer"
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, {
@matiskay
matiskay / gitio
Created June 14, 2012 12:57 — forked from defunkt/gitio
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
@matiskay
matiskay / gist:3181894
Created July 26, 2012 12:56
Clean Install – Mountain Lion OS X 10.8 DP3
@matiskay
matiskay / README.md
Created February 12, 2013 19:37 — forked from fnichol/README.md

Vagrant apt-cacher-ng Box

Simple and easy, just:

mkdir apt-cacher-ng && cd apt-cacher-ng
curl -LO https://raw.github.com/gist/1747868/Vagrantfile
vagrant up

Tail the logs perhaps?