Skip to content

Instantly share code, notes, and snippets.

View jorgemario's full-sized avatar

Jorge M. Gómez jorgemario

View GitHub Profile
@jorgemario
jorgemario / usb-autosuspend.conf
Created January 28, 2014 23:53
Ubuntu 13.10 - laptop-mode disable autosuspend of mouse and/or keyboard
First take note of usb device IDS:
> lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 064e:d213 Suyin Corp.
Bus 001 Device 003: ID 8087:07da Intel Corp.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0bc2:2320 Seagate RSS LLC USB 3.0 bridge [Portable Expansion Drive]
@jorgemario
jorgemario / VirtualBoxGuestAdditions
Created February 2, 2014 17:36
VirtualBox Guest additions in Ubuntu 12.04
sudo apt-get install build-essentials
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install virtualbox-guest-dkms
cd /media/VBOXADDITIONS/
sudo ./VBoxLinuxAdditions.run
@jorgemario
jorgemario / bumblebee installation
Last active August 29, 2015 14:00
Bumblebee Ubuntu 12.04 (Elementary OS)
Bumblebee Elementary OS (Ubuntu 12.04 precise)
# https://wiki.ubuntu.com/Bumblebee
1. sudo add-apt-repository ppa:bumblebee/stable
2. For more up-to-date nvidia drivers, you need to add another PPA. As of 12.04, this is still necessary for Nvidia GT 6xxM cards. It may be optional for the GT 4xxM and GT 5xxM series on 12.04. When in doubt, just install it. The command is:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
3. sudo apt-get update
# http://gitready.com/beginner/2009/03/09/remote-tracking-branches.html
git config branch.autosetupmerge true
git checkout -b branch_name origin/branch_name
# sample
git fetch origin hotfix/576
> * branch hotfix/576 -> FETCH_HEAD
> * [new branch] hotfix/576 -> origin/hotfix/576
# setup the remote branch as a local branch
@jorgemario
jorgemario / .gitconfig
Last active August 29, 2015 14:01
git config
[user]
name = Jorge M Gomez C
email = jorgemario@gmail.com
[core]
excludesfile = /home/jorge/.gitignore_global
[color]
branch = auto
diff = auto
interactive = auto
status = auto
@jorgemario
jorgemario / clam_install.bash
Created May 28, 2014 16:37
ClamAV install on Ubuntu
$ sudo apt-get install clamav-daemon
$ freshclam
$ /etc/init.d/clamav-daemon start
@jorgemario
jorgemario / mac_ntfs.bash
Last active August 29, 2015 14:02
Mount ntfs volumes in mac with write support
# from:
# http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/
$ diskutil info /Volumes/DRIVENAME | grep UUID
# use UUID to reference the drive
$ sudo echo "UUID=ENTER_UUID_HERE none ntfs rw,auto,nobrowse" >> /etc/fstab
# or, use the label
$ sudo echo "LABEL=WINDOWS8 none ntfs rw,auto,nobrowse" >> /etc/fstab
@jorgemario
jorgemario / dump.sh
Created October 3, 2014 14:44
Dum postgres database
pg_dump --file=/usr/local/pgbackups/imsprod.20140910.pgdump --no-tablespaces --format=c --verbose --schema=ims imsproddb
@jorgemario
jorgemario / gist:de5d7740eb2fa81017f7
Last active August 29, 2015 14:07
mac setup with brew
http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
binaries=(
rename
sshfs
trash
node
tree
ack
hub
#!/bin/bash
function msg {
# Description:
# This function echoes-with-colors the arguments passed in
# Usage:
# msg 'whatever you want to print :)'
echo -e '\033[33m\033[44m'$@'\033[0m'
}