Skip to content

Instantly share code, notes, and snippets.

View DavidToca's full-sized avatar
🕶️
testing

David Toca DavidToca

🕶️
testing
View GitHub Profile
@DavidToca
DavidToca / 0_reuse_code.js
Created July 16, 2014 15:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Debian Wheezy - Fixing HeartBleed
# Installing 1.0.1e-2+deb7u4
# http://www.corsac.net/?rub=blog&post=1565
# https://security-tracker.debian.org/tracker/DSA-2896-1
#
# As pointed out, not the best secured way but fast. Please use 'apt-get && apt-get upgrade' for a more secure system.
wget http://security.debian.org/pool/updates/main/o/openssl/libssl1.0.0-dbg_1.0.1e-2+deb7u5_amd64.deb
wget http://security.debian.org/pool/updates/main/o/openssl/openssl_1.0.1e-2+deb7u5_amd64.deb
wget http://security.debian.org/pool/updates/main/o/openssl/libssl1.0.0_1.0.1e-2+deb7u5_amd64.deb
@DavidToca
DavidToca / gist:8391709
Created January 12, 2014 22:46
install nginx
sudo -s
nginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginx
apt-get update
apt-get install nginx
@DavidToca
DavidToca / install_python.sh
Last active January 3, 2016 01:49
install python development tools on ubuntu
sudo apt-get install -y python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
pip install virtualenvwrapper
@DavidToca
DavidToca / install.sh
Created January 6, 2014 03:20
new ubuntu machine
sudo apt-get install git-core;
sudo apt-get install zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs24
@DavidToca
DavidToca / install_solr.sh
Created September 10, 2013 15:44
install solr on linux
#install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
#check is installed
java -version
#install curl
sudo apt-get install libcurl3 libcurl3-dev curl
@DavidToca
DavidToca / Install PIL on linux
Last active May 7, 2018 17:03
Install PIL on linux
sudo apt-get update ;
sudo apt-get install libjpeg-turbo8-dev libjpeg8-dev ;
sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev zlib1g-dev libfreetype6-dev liblcms1-dev libjpeg62-dev;
sudo apt-get build-dep python-imaging
#PIL cant find the files he needs, so we need to make symlinks to the files he looks for
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/ ;
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/ ;
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/;
@DavidToca
DavidToca / unix_tricks.txt
Created March 24, 2013 21:50
unix tricks
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest. Come back soon for more!
BASH
* In bash, 'ctrl-r' searches your command history as you type
- Input from the commandline as if it were a file by replacing
'command < file.in' with 'command <<< "some input text"'
- '^' is a sed-like operator to replace chars from last command
'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty.
* '!!:n' selects the nth argument of the last command, and '!$' the last arg
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@DavidToca
DavidToca / gist:4192179
Created December 3, 2012 02:11
update - install emacs 24.2 from cli on mac os X
curl -O http://ftp.gnu.org/gnu/emacs/emacs-24.2.tar.gz //
tar -xvzf emacs-24.2.tar.gz
cd emacs*
./configure -without-x
make
// see if it works with src/emacs -Q
sudo make install
// replace cur vers of emacs
sudo mv /usr/bin/emacs /usr/bin/emacs.bk