Also see reference
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
// Packages/User/JavaScript.sublime-settings | |
// Packages/User/HTML.sublime-settings | |
// Packages/User/CSS.sublime-settings | |
{ | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true | |
} |
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
# Use Python 3 for easy unicode | |
$ virtualenv -p python3 .env | |
$ source .env/bin/activate | |
$ pip install django | |
$ deactivate | |
# Start new django project and app | |
$ django-admin.py startproject mysite | |
$ ./manage.py migrate | |
$ ./manage.py createsuperuser |
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
# API | |
GULF_AIR = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&VISA=&page=visa&PASSTYPES=PASS&NA=CN&AR=00&DE=US&user=STAR&subuser=STARB2C' | |
STAR_ALLIANCE = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&VISA=&page=visa&PASSTYPES=PASS&NA=CN&AR=00&DE=US&user=GF&subuser=GFB2C' | |
KLM = 'https://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&HEALTH=1&VISA=1&NA=AT&EM=AT&DE=AU&PASSTYPES=PASS&user=KLMB2C&subuser=KLMB2C' | |
# Web | |
AIR_BIRLIN = 'http://www.timaticweb.com/cgi-bin/login_website.cgi?user=MALLORCA&subuser=ABCUST&password=SHUTTLE' | |
EMIRATES = 'http://www.emirates.com/english/plan_book/essential_information/visa_passport_information/find_visa_requirements/visa_passport_information_results.aspx?NC=AR&NV=Argentina&DC=AT&DV=Austria&h=79fb1336bcc87035c550b97e3825699d8667b952' |
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
$ ls -ls | awk '{print $7,$11}' |
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
// | |
// http://en.wikipedia.org/wiki/Quickselect | |
// Quickselect | |
// | |
// Find the kth smallest element in an unordered list | |
// | |
#include <iostream> | |
using namespace std; |
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
#include <atomic> | |
#include <conio.h> | |
#include <chrono> | |
#include <iostream> | |
#include <thread> | |
#include <vector> | |
using namespace std; | |
atomic<int> data(0); |
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
# http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/ | |
# | |
$ wget https://dl.dropboxusercontent.com/u/6233134/cp | |
$ sudo chmod +x cp | |
$ ./cp -gR src/*[13579].jpg dest/ |
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
# Linux / Mac | |
$ lipo -info filename.a | |
$ file filename.a | |
# Windows | |
$ dumpbin /rawdata:1 library.lib | |
$ dumpbin /headers program.exe |
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
# build static libraries for both i386 and x86_64 arch | |
$ mkdir build | |
$ cd build | |
$ cmake -DBUILD_SHARED_LIBS=OFF "-DCMAKE_OSX_ARCHITECTURES=i386;x86_64" .. | |
$ make -j8 |