Skip to content

Instantly share code, notes, and snippets.

View fabioyamate's full-sized avatar

Fabio Yamate fabioyamate

View GitHub Profile
@cstrahan
cstrahan / pair.md
Created April 11, 2012 00:22 — forked from wm/pair.md
TMUX Pairing

SSH setup for remote pairing

If Animal and Fozzie wanted to pair on Animals machine and they both have access to shared.muppets.com then they could use the following setup

  • Animal will have the following in ~/.ssh/config
Host tunnel_from_muppets
  Hostname space.muppets.com
 RemoteForward 1235 localhost:22
@hsablonniere
hsablonniere / README.md
Created May 2, 2012 22:42
scrollIntoViewIfNeeded 4 everyone!!!

scrollIntoViewIfNeeded 4 everyone!!!

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.

Usage

Just use the code in index.js in your app or website. You can see usage in the test page test.html.

The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.

@fabioyamate
fabioyamate / extract.sh
Created May 14, 2012 03:26
One line script to extract multiples rar files, with historic of ones already extracted
# Extract multiple rar files in subdirs from torrent files
#
# it doesn't extract files that have been previously. Always run the script file in
# the same dir as extrected.list, since it store path
#
# 1. ls **/*.rar - look up to any rar files in sub dirs
# 2. ignores all files that matches ones in the extracted.lst file
# 3. appends the non-extracted files to the lst file
# 4. for each rar file, extract them in the current directory
#
@fabioyamate
fabioyamate / yui.html
Last active October 5, 2015 18:58
YUI snippet to start working
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YUI Snippet</title>
<link rel="stylesheet" href="http://rawgithub.com/necolas/normalize.css/master/normalize.css">
<script src="http://rawgithub.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js"></script>
</head>
<body>
<div id="container"></div>
@jotto
jotto / google_oauth2_access_token.rb
Created June 14, 2012 21:15
ruby command line script for generating google oauth2 access token
# (create oauth2 tokens from Google Console)
client_id = ""
client_secret = ""
# (paste the scope of the service you want here)
# e.g.: https://www.googleapis.com/auth/gan
scope = ""
@stuarthalloway
stuarthalloway / Datomic News Updates
Created June 18, 2012 14:53
Datomic update examples against a social news database
;; Datomic example code
;; demonstrates various update scenarios, using a news database
;; that contains stories, users, and upvotes
;; grab an in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://foo")
(d/create-database uri)
(def conn (d/connect uri))
var subscription = new Rx.CompositeDisposable();
var observable = Rx.Observable.fromSocket('ws://localhost:8080', 'stock-protocol');
subscription.add(
observable.selectMany(function (value) {
var data = JSON.parse(value.data);
return Rx.Observable.fromArray(data.data);
}).groupBy(function (quote) {
return quote.symbol;
@thealscott
thealscott / gist:3349897
Created August 14, 2012 14:41 — forked from corydorning/Cross-Browser ::before and ::after pseudo-class polyfill
Cross-Browser ::before and ::after pseudo-class polyfill - adapted into mixins for SCSS using modernizr
@mixin after-polyfill(){
.ie7 & {
/* creates <span class="ie-after"></span> */
zoom: expression( this.runtimeStyle.zoom="1", this.appendChild( document.createElement("span") ).className="ie-after" );
}
}
@mixin before-polyfill(){
.ie7 & {
/* creates <span class="ie-before"></span> */
@joho
joho / gist:3735740
Created September 17, 2012 05:40 — forked from rafaelss/gist:3700977
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
@rubiii
rubiii / how_it_works.md
Created December 2, 2012 11:14
MacVim-Formatter for RSpec
$ rspec --format MacVimFormatter --color spec