Skip to content

Instantly share code, notes, and snippets.

(function($){
$.fn.fancyToggle = function(){
var myobj = this;
if (myobj.hasClass('in')) {
myobj.removeClass('in');
setTimeout( function() {
myobj.addClass('hide')}
, 100)
} else {
myobj.removeClass('hide');
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env bash
sudo su -;
# Ruby
echo "gem: --no-ri --no-rdoc" > ~/.gemrc;
yum remove -y ruby;
yum groupinstall -y 'Development Tools';
yum groupinstall -y development-libs;
yum install -y libffi-devel;
yum install -y libyaml-devel;
@shaneog
shaneog / Gemfile
Created December 18, 2013 21:53 — forked from cblunt/Gemfile
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
@shaneog
shaneog / nginx.conf
Last active January 2, 2016 21:29
Nginx configuration file (used on Amazon Linux)
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
# This number should be, at maximum, the number of CPU cores on your system.
# (since nginx doesn't benefit from more than one worker per CPU.)
worker_processes 4;
# Number of file descriptors used for Nginx. This is set in the OS with 'ulimit -n 200000'
@shaneog
shaneog / gist:8977948
Last active August 29, 2015 13:56 — forked from yahelc/gist:1004702
(function(){
var event_names = {
"click" : "" ,
"tweet" : "",
"retweet" : "source_tweet_id",
"follow" : "screen_name",
"favorite" : "tweet_id"
};
for(var event_name in event_names)
#!/usr/bin/env ruby
# Author : Emad Elsaid (https://github.com/blazeeboy)
require 'koala' # gem install koala --no-document
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "user_status", "friends_status", "user_checkins" when authenticating
oauth_access_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
graph = Koala::Facebook::API.new(oauth_access_token)
places = []
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@shaneog
shaneog / limits.sh
Created May 8, 2014 14:25
Used on Amazon Linux to set up reasonable system limits
echo "
fs.file-max = 70000" >> /etc/sysctl.conf;
DATA="* soft nofile 64000\n* hard nofile 64000\n* soft nproc 32000\n* hard nproc 32000\n\n# End of file";
DATA=`echo ${DATA} | tr '\n' "\\n"`;
sed -i "s/# End of file/${DATA}/" /etc/security/limits.conf;
echo "# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.