This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip list --outdated --format=freeze | cut -d= -f1 | xargs pip install -U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# source this file to enable a virtual webcam | |
# that is a stream of the desktop | |
# | |
sudo modprobe v4l2loopback exclusive_caps=1 | |
ffmpeg -f x11grab -r 15 -s 360x480 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pglocal { | |
if [ "$1" = "" ]; then | |
echo "Run like this:" | |
echo "pglocal USER DATABASE PATH/TO/FILE" | |
else | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -$ | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. M-x find-name-dired: you will be prompted for a root directory and a filename pattern. | |
2. Press t to "toggle mark" for all files found. | |
3. Press Q for "Query-Replace in Files...": you will be prompted for query/substitution regexps. | |
4. Proceed as with query-replace-regexp: SPACE to replace and move to next match, n to skip a match, etc. | |
Source: http://stackoverflow.com/a/271136 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependancies | |
# $ sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev | |
# Script itself symlinks | |
ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib | |
ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib | |
ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib | |
# Then install PIL | |
# pip install -U PIL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure this makefile if needed then run | |
# $ make all | |
# to compile and link | |
# What files to compile | |
OBJS=money.cpp | |
# What file to compile to | |
MAINFILE=money | |
# What compiler to use | |
CC=g++ |