Skip to content

Instantly share code, notes, and snippets.

Francis Luong (Franco) francisluong

Block or report user

Report or block francisluong

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
francisluong / automator_lock_screen
Created Nov 3, 2014
Applescript to start screen saver (lock screen) - bind to ctrl-command-l
View automator_lock_screen
#Service receives *no input* in *any application*
# bind to ctrl-alt-l in keyboard shortcuts
on run {input, parameters}
tell application "System Events" to start current screen saver
return input
end run
francisluong / drac_mac.rb
Last active Aug 29, 2015
ARPA: output port to mac mappings on IB network
View drac_mac.rb
#!/usr/bin/env ruby
require 'arpa/racktastic/racktastic'
require 'arpa/racktastic/config'
require 'arpa/racktastic/data/data'
require 'sinatra'
require 'arpa/racktastic/controller/catalyst4948_switch_controller'
require 'arpa/racktastic/accessor/factory'
require 'pp'
francisluong / screenrc
Last active Aug 29, 2015
Franco's screenrc
View screenrc
# Key reference
# C-a c -- new window
# C-a A -- rename window
# C-a <#> -- switch window
# C-a k -- kill window
# C-a h -- hardcopy
# C-a H -- toggle log
francisluong / Vagrantfile
Last active Sep 19, 2015
Vagrant Bootstrapping for Ubuntu
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "ubuntu/trusty64" "public_network"
config.vm.synced_folder "../data", "/vagrant_data"
francisluong / snmp.conf
Created Sep 9, 2014
net-snmp snmp.conf
View snmp.conf
mibs +ALL
defVersion 2c
defCommunity public
francisluong /
Created Sep 3, 2014
Random Integer 0-9999
#!/usr/bin/env python
from time import time
import random
print random.randint(0,9999)
francisluong /
Last active Aug 29, 2015
Git Setup to Checkout Pull Requests
git config --add remote.origin.fetch +refs/pull/*/head:refs/remotes/origin/pr/*
git config -l
git fetch origin
View .bashrc-git
#!/usr/bin/env bash
AWK="`which awk`"
BASENAME="`which basename`"
DATE="`which date`"
FIND="`which find`"
GIT="`which git`"
GREP="`which grep`"
LESS="`which less`"
PRINTF="`which printf`"
View .vimrc
:set ai
:set softtabstop=4 shiftwidth=4 expandtab
:set pastetoggle=<f5>
:nmap <C-n> :noh<CR>
:nmap <C-.> :bn<CR>
:nmap <C-,> :bp<CR>
:nmap <S-Tab> <<
:nmap <Tab> >>
:imap <S-Tab> <C-d>
:syntax enable
You can’t perform that action at this time.