Skip to content

Instantly share code, notes, and snippets.

View salvianoo's full-sized avatar

Salviano Ludgério salvianoo

  • Fretebras
  • Brazil
View GitHub Profile
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@pithyless
pithyless / gist:1208841
Created September 10, 2011 21:49
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@eshiota
eshiota / ux_referencias
Created November 5, 2011 15:58
UX para Developers - Referências
# UX para Developers - Referências
## Soluções prontas
- jQuery Mobile (http://www.jquerymobile.com)
- HTML 5 Boilerplate (http://html5boilerplate.com)
## Ferramentas
- Spin.js (http://fgnass.github.com/spin.js)
@tbeseda
tbeseda / gist:1374658
Created November 17, 2011 21:52
rbenv from rvm with Homebrew
  • $ rvm implode to remove rvm completely, thanks Wayne.
  • $ brew install rbenv to get the new hawtness!
  • $ brew install ruby-build to allow us to install Rubies (rbenv doesn't have an install command).

to ignore the version files rbenv makes add this to ~/.gitconfig_global .rbenv-version

to ignore your locally bundled gems add this to ~/.bundle/config: --- BUNDLE_PATH: vendor/bundle

@salvianoo
salvianoo / euler1.rb
Created November 27, 2011 17:08
Project Euler No.1 Ruby
def div_by_three_or_five(arry)
sum = 0
arry.each do |item|
if item % 3 == 0 or item % 5 == 0
sum += item
end
end
sum
end
@lengarvey
lengarvey / gemstats.rb
Created January 12, 2012 04:42
Get a list of how many gems there are for each letter.
require 'rest_client'
url = "http://rubygems.org/gems?letter="
('A' .. 'Z').each do |letter|
response = RestClient.get url + letter
total = response.to_s.match(/(\d+)<\/b> in total/)[1]
puts letter + " total " + total
end
@sj26
sj26 / README.md
Created January 19, 2012 07:41
Run MailCatcher in the background, always, on OS X

Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.

If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.

Currently pow doesn't seem to pass websockets through correctly. Looking into this.

@ry
ry / fib.js
Created March 12, 2012 00:17
a proper fibonacci server in node. it will light up all your cores.
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
}
@codahale
codahale / pom.xml
Last active April 20, 2024 01:38
Take this and save it as pom.xml in your project directory.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- none yet -->