Skip to content

Instantly share code, notes, and snippets.

View amatellanes's full-sized avatar

Adrián Matellanes amatellanes

View GitHub Profile
@amatellanes
amatellanes / remove_app_launchpad_yosemite.sh
Created September 19, 2015 06:52
Remove apps from Launchpad in Mac OS X 10.10 (Yosemite)
sqlite3 $(sudo find /private/var/folders -name com.apple.dock.launchpad)/db/db "DELETE FROM apps WHERE title='APPNAME';" && killall Dock
@amatellanes
amatellanes / django_ext_script.py
Last active March 9, 2018 22:54
Bypassing manage.py in Django.
from django.core.management import setup_environ
from myproject import settings
setup_environ(settings)
# As of Django 1.4
import os
@amatellanes
amatellanes / git_archive.sh
Created July 20, 2014 10:12
Create tarball and zipball from a repo using git.
git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz # Create a compressed tarball for v1.4.0 release.
git archive --format=zip --prefix=git-1.4.0/ v1.4.0 > git-1.4.0-docs.zip # Create a compressed zipball for v1.4.0 release.
@amatellanes
amatellanes / pip_upgrade.sh
Created January 6, 2016 22:47
Pip Upgrade All Outdated Python Packages
pip list --outdated | awk '{print $1}' | xargs pip install -U
@amatellanes
amatellanes / bleachbit.sh
Last active December 28, 2015 02:39
Install BleachBit 1.2 on Ubuntu 14.04 LTS (Trusty Tahr)
wget http://katana.oooninja.com/bleachbit/sf/bleachbit_1.2_all_ubuntu1404.deb;
sudo dpkg -i bleachbit_1.2_all_ubuntu1404.deb;
sudo apt-get -f install;
@amatellanes
amatellanes / disable_wireless
Created November 2, 2014 09:32
Disable permantly wireless connection in Linux.
# Add next line to `/etc/network/interfaces`
iface wlan0 inet manual
# Restart NetworkManager
$ sudo service network-manager restart
@amatellanes
amatellanes / elasticsearch_startup.sh
Last active August 29, 2015 14:04
Configure Elasticsearch to run at startup
# Add the service to the automatic startup system. For further detail look at the man page
# for update-rc.d by typing the command man update-rc.d
sudo update-rc.d eleasticsearch defaults
@amatellanes
amatellanes / Configure Spanish keyboard on Ubuntu
Created June 6, 2014 22:26
Configure Spanish keyboard on Ubuntu.
# Fast method. Run next command on terminal
sudo setxkbmap -layout 'es,es' -model pc105
# Modify /etc/X11/xorg.conf file
Section “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″