Skip to content

Instantly share code, notes, and snippets.

View daniel-garcia's full-sized avatar

Daniel García daniel-garcia

View GitHub Profile

asdfasdf

vagrant plugin install vagrant-proxyconf
mkdir -p ~/.vagrant.d
cat <<EOF > ~/.vagrant.d/Vagrantfile
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://www-proxy.us.oracle.com:80/"
config.proxy.https = "http://www-proxy.us.oracle.com:80/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
# ... other stuff
@daniel-garcia
daniel-garcia / install.sh
Created July 14, 2015 03:06
install 32bit chrome and sublime_text
#!/usr/bin/sh
sudo apt-get install firmware-b43-installer libappindicator1
if [ ! -f /usr/bin/google-chrome ]; then
wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome-stable_current_i386.deb
sudo apt-get -f -y install
fi
sudo apt-get install linux-tools-common
sudo apt-get install -y linux-tools-3.13.0-48-generic linux-cloud-tools-3.13.0-48-generic
sudo perf top -p $(pgrep processname)
@daniel-garcia
daniel-garcia / install-vimgo.sh
Created March 29, 2015 16:42
install vim-go
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle/
git clone https://github.com/fatih/vim-go.git
git clone https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe/
git submodule update --init --recursive
sudo apt-get install cmake g++ python-dev
./install.sh
mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
cd ~
@daniel-garcia
daniel-garcia / dgarcia.pub
Created November 24, 2014 20:25
public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzQeLPywzV+/x8z/bsk1Efj8E/0G4CFMi27QoZSWppwbT2dMO/n/vMj2Gk3miF2cFyaU98g55KE2i2cFFV2mJ+UCIfIblWEaXn7r4IScospLNGeii17Xkw4yaFuz2e9+KGuFozC6RbApQrNzeAyXn/p15OjozcmU5OxRxsvpWiMzw3uU3lQIgVRiSMMHo536gz0MIeM6yahccJlu9dr+lq00DVWxleJBdoYcc4SlhGYl16I74/L9oCe46+Wz6npwpWsuYyZB2FBU3F3QYxtn5D86x5aVuIqeDvzwiCbW3uqMD1KCC0NpaY0HglMeaCqphgzq6BseY7DMJDBfvM48X7 daniel@Daniels-MacBook-Pro.local
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDub9lL3gf02U0s+206FwhCO5njweBuDtt3E94auAqjkd9Nc3wGTIv9MpUpp2eMmOkdI0dGqRq9NtkcNEbqBFtuonFSYGV2Ur67p9TrsN95zgXmx7ncipkpatOiosOW9L7o+kN15QcefC6OhXgs1hcD7PRkU4wzoCRtSOcGp6Oc1WEOcyqwn0nJkNLwxLSiJyxmw5661WfhPMvO8+mN5/6mQBmNz+DfL56ousSHOK7O9UpzERqhEOBZWW+48z/3VySeg8wMnnrBLSXhme8eUEIADXOpwWBGAroUkB3BcP9f0qjc2UIQ2VqhEMkwOed3DS3RTHH032SwsCwg5Uyfv8Ub dgarcia@dgarcia-desktop
@daniel-garcia
daniel-garcia / ZEN-14322.patch
Created September 16, 2014 18:49
patch to metricpublisher to lock connection before performing redis operations
diff --git a/Products/ZenHub/metricpublisher/publisher.py b/Products/ZenHub/metricpublisher/publisher.py
index 96872c2..7c4ae85 100644
--- a/Products/ZenHub/metricpublisher/publisher.py
+++ b/Products/ZenHub/metricpublisher/publisher.py
@@ -20,6 +20,7 @@ from twisted.web.iweb import IBodyProducer
from twisted.web.http_headers import Headers
from zope.interface import implements
from txredis import RedisClientFactory
+from threading import Lock
// server.go
package main
import (
"fmt"
"log"
"net"
"net/rpc"
"testing"
)
#!/bin/bash
#
# Get a stack trace of the tasks matching the supplied regex
#
# This script was inspired by:
# http://old.zope.org/Members/4am/debugspinningzope
###############################################################################
#==============================================================================
function Usage