This file contains hidden or 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
try: | |
from P4 import P4, P4Exception | |
p4 = P4() | |
p4.connect() | |
print p4.client | |
except P4Exception, e: | |
print "P4 Error", str(e) |
This file contains hidden or 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 <alloca.h> | |
#include <stdlib.h> | |
#include <string> | |
#include <vector> | |
#include <map> | |
/* Implementation of Nolithius' name generator: | |
* Demo: http://www.nolithius.com/game-development/weightedletter-name-generator | |
* Code: https://code.google.com/p/weighted-letter-namegen |
This file contains hidden or 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
#pragma once | |
/** A small hash table | |
* | |
* - The memory must be allocated by the user | |
* - It cannot grow | |
* - It asserts when putting an item into a full table | |
* - Supports keys with % and == operators | |
* - Supports values with = operator | |
*/ |
This file contains hidden or 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
{ | |
"shell_cmd": "./waf", | |
"working_dir": "$folder", | |
"file_regex": "\\.\\.\\/(.+?):(\\d+):(\\d+)" | |
} |
This file contains hidden or 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
[ | |
{ "keys": ["alt+tab"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm", "vsh", "fsh"]} }, | |
{ "keys": ["super+shift+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"github"} }, | |
{ "keys": ["ctrl+§"], "command": "show_panel", "args": {"panel": "console", "toggle": true} } | |
] |
This file contains hidden or 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
#!/usr/bin/env bash | |
FPS=15 | |
SIZEPX=320 | |
STARTTIME=0 | |
DURATION=0 | |
PALETTE="/tmp/palette.png" | |
TMPGIF="/tmp/$2" |
This file contains hidden or 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
#version 410 | |
#ifdef GL_ES | |
precision mediump float; | |
#define LOWP lowp | |
#else | |
#define LOWP | |
#endif | |
uniform sampler2D texture0; |
This file contains hidden or 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
# Creating a binary patch with the diff between folders | |
#$ git diff --no-index --binary a/ b/ > diff.patch | |
#$ diff -Naur a/ b/ > diff.patch | |
git diff --no-index --binary $1 $2 |
This file contains hidden or 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
#!/usr/bin/env bash | |
WORK=~/work | |
EXTERNAL=$WORK/external | |
PROJECTS=$WORK/projects | |
if [ ! -e $WORK ]; then mkdir $WORK; fi | |
if [ "" == "`which brew`" ] |
This file contains hidden or 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
// Touch screen example for arduino using a Nintendo 2ds touch screen | |
// Code is mostly inspired from http://tronixstuff.com/2010/12/29/tutorial-arduino-and-the-ds-touch-screen/ | |
// and the Adafruit touch screen library | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> |
OlderNewer