Skip to content

Instantly share code, notes, and snippets.

Lucas Fais lucasfais

  • São Paulo, Brazil
Block or report user

Report or block lucasfais

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
lucasfais / currentTrackLyrics.swift
Created Nov 27, 2015
Opens Musixmatch website searching for the current iTunes track
View currentTrackLyrics.swift
#! /usr/bin/swift
import ScriptingBridge
import AppKit
@objc protocol iTunesTrack {
optional var artist: String {get}
optional var name: String {get}
optional var album: String {get}
lucasfais / Vagrantfile
Last active Dec 25, 2015
Vagrantfile for Arch Linux. It's ok with vagrant 1.3.4.
View Vagrantfile
# My helpers
def fwd_ports(config, ports)
ports = [ports] unless ports.respond_to?(:each)
ports.each do |port| :forwarded_port, guest: port, host: port
View gitconfig
name = X
email =
branch = auto
status = auto
diff = auto
ci = commit
co = checkout
View fizz_buzz.exs
# Fizz Buzz Test
fizz_buzz = fn
(0, 0, _) -> "FizzBuzz"
(0, _, _) -> "Fizz"
(_, 0, _) -> "Buzz"
(_, _, x) -> x
View parallel_requests.exs
defmodule ParallelRequests do
def execute_requests(urls) do
:inets.start() urls, do_parallel_request(&1, self)
do_collect_responses(length(urls), 0)
defp do_parallel_request(url, parent_id) do
View gist:419779
My configuration: ruby 1.8.7-p174, rails 2.3.5 and mongoid 1.9.0.
I need make a tree of nested categories like this:
Category 1
Category 11
Category 12
Category 121
Category 2
View gist:176300
SSHFS mount
1. (instalar MacFuse)
2. (descompactar e copiar para /usr/local/bin/sshfs; dar permissao de execucao)
3. sshfs root@search_vm:/ /Users/lfais/work/search_vm/ -o allow_other,auto_cache,reconnect,volname=SEARCH_VM,defer_permissions
lucasfais / gist:14754
Created Oct 4, 2008
Avisando o Rails da depenencia com factory_girl
View gist:14754
config.gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => ""
View factories.rb
Factory.define :operation_one, :class => Operation do |o|
o.description 'Salario'
o.category 'Proventos'
o.value 5000
Factory.define :operation_two, :class => Operation do |o|
o.description 'Gasolina'
o.category 'Transporte'
o.value -200
You can’t perform that action at this time.