Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabio Yamate fabioyamate

View GitHub Profile
View rbenv-install-system-wide.sh
#!/bin/bash
# Run the script as root user
#
# copy the script to the /root and chmod +x to the file.
#
# $ ./rbenv-install-system-wide.sh
#
# and wait
@fabioyamate
fabioyamate / dabblet.css
Created Apr 27, 2013
Circular Tooltip (SO)
View dabblet.css
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@fabioyamate
fabioyamate / _README.md
Created May 25, 2011 — forked from kneath/_README.md
Intelligent asset bundling for Rails (GitHub's asset bundling)
View _README.md

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
View gist:672060
# this shows how to use the update functionality for a single feed with feedzirra
require 'rubygems'
require 'feedzirra'
# I'm using Atom here, but it could be anything. You don't need to know ahead of time.
# It will parse out to the correct format when it updates.
feed_to_update = Feedzirra::Parser::Atom.new
feed_to_udpate.feed_url = some_stored_feed_url
feed_to_update.etag = some_stored_feed_etag
feed_to_update.last_modified = some_stored_feed_last_modified
View Rakefile
require 'rake/clean'
HAML = FileList['**/*.haml']
LESS = FileList['**/*.less']
COFFEE = FileList['**/*.coffee']
HTML = HAML.ext('html')
CSS = LESS.ext('css')
JS = COFFEE.ext('js')