Skip to content

Instantly share code, notes, and snippets.

@lucashungaro
lucashungaro / links.textile
Created August 14, 2010 16:36
Links de referência utilizados em minha palestra
@jamesbrooks
jamesbrooks / EXAMPLE.js
Created November 18, 2010 12:50
jQuery Skeleton Plugin
$('#element').plugin(); // calls init
$('#element').plugin({ foo: 'bar' }); // calls init and extends the hash into settings
$('#element').plugin('doSomething'); // calls init (if it hasn't already been done) and calls doSomething
$('#element').plugin('doSomething', { cake: 'delicious' }); // calls init and calls doSomething with the provided argument
@oesmith
oesmith / puppet-install.sh
Created June 28, 2011 12:05
Install Puppet 2.6.2 from lenny-backports on Ubuntu 10.04 LTS
cat > /etc/apt/preferences.d/backports <<EOF
Package: puppet puppet-common puppetmaster facter
Pin: release a=lenny-backports
Pin-Priority: 900
EOF
cat > /etc/apt/sources.list.d/backports.list <<EOF
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
EOF
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@RichGuk
RichGuk / gist:2227598
Created March 28, 2012 15:52
VirtualBox commands
VBoxManage createvm --name Win7 --register
# Get a list of oses with VBoxManage list ostypes
VBoxManage modifyvm Win7 --ostype Windows7_64 --memory 1024 --vram 30 --acpi on \
--cpus 2 --ioapic on --boot1 dvd --nic1 bridged --bridgeadapter1 eth1
VBoxManage createhd --filename /VM/Win7/Win7.vdi --size 15360
VBoxManage storagectl Win7 --name "SATA" --add sata --sataportcount 4 --hostiocache on
VBoxManage storagectl Win7 --name "IDE" --add IDE
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 13, 2024 02:39
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@zenkay
zenkay / gist:3237860
Created August 2, 2012 15:19
Installation tips for RVM/Ruby on OSX 10.8 Mountain Lion

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

@adrienbrault
adrienbrault / purge.sh
Created September 24, 2012 10:02
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@nickbudi
nickbudi / README.md
Last active February 17, 2024 14:25
Budi's Counter-Strike: Global Offensive config

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config. Changelogs can be found under revisions here

Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

After the Wild West Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg

Launch Options

@alex-zige
alex-zige / gist:5795358
Last active June 8, 2023 07:49
Rails Rspec API Testing Notes

Rails Rspec APIs Testing Notes

Folders Structure

  spec
  |--- apis #do not put into controllers folder. 
        |--- your_api_test_spec.rb  
  |--- controllers
  |--- models
  |--- factories
 |--- views