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
Show hidden characters
{ | |
"build_systems":[ | |
{ | |
"env": | |
{ | |
"TEST_SETTINGS_MODULE": "mysite.settings.testing", | |
"VENV_FOLDER": "/srv/localhost.mysite.com/venv/mysite/" | |
}, | |
"file_regex": "^ *File \"(...*?)\", line ([0-9]*)", | |
"name": "app unit tests", |
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
# download opencv first | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev |
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
#! /bin/bash | |
randpw(){ < /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-16};echo;} | |
MYSQL_ROOT_PW="your_root_pw_for_mysql_here" | |
SITE=$1 | |
USER=${SITE/\./_} | |
DBNAME=$USER | |
PASSWORD=$(randpw) |
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
partial partial alphanumeric_keys | |
xkb_symbols "basic" { | |
name[Group1] = "Engelsk og Norsk"; | |
include "us(altgr-intl)" | |
// My custom changes: | |
key <AE11> { [ minus, underscore, endash, emdash ] }; | |
key <AD11> { [ bracketleft, braceleft, aring, Aring ] }; | |
key <AC10> { [ semicolon, colon, oslash, Oslash ] }; | |
key <AC11> { [ apostrophe, quotedbl, ae, AE ] }; | |
key <AB08> { [ comma, less, guillemotleft ] }; |
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
#!/bin/bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
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
def numberguess(attempts=3, name=None, number=10): | |
while not name: | |
name = input('Hello, what is your name? ') | |
if attempts == 0: | |
print('Your three guesses are over, the number I was thinking of was %d.' % number) | |
return | |
while True: | |
guess = input('Well %s please guess a number between 1 and 20 ' % name) |
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
<div id=app> | |
</div> |
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
global !p | |
from snippet_helpers import * | |
def expand_proptypes(props): | |
if not props: | |
return '' | |
pattern = '{}: React.PropTypes.any' | |
props = (prop.strip() for prop in props.split(',')) | |
return ',\n '.join(pattern.format(prop) for prop in props) | |
endglobal |
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
# Ultisnips snippet for getting the current tmux layout. | |
# Use it in tmuxinator config files. | |
snippet layout: "tmux layout" iA | |
layout: ${1:`tmux lsw -F '#{window_active} #{window_layout}'|awk '/^1/{print $2}'`} | |
endsnippet |
OlderNewer