There used to be a tutorial here for using Torch7 on EC2, but it's now outdated. It is best to use an EC2 image that already has Torch7 and CUDA stuff preinstalled.
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
/* | |
* USAGE: | |
* #include <ctime> | |
* ... | |
* void your_func() { | |
* measure_time t(__func__); | |
* // your code... | |
* } | |
*/ | |
struct measure_time { |
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
set nocompatible | |
filetype off | |
call pathogen#helptags() | |
call pathogen#runtime_append_all_bundles() | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
set history=1000 | |
set ruler |
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 getMethods(obj) { | |
var result = []; | |
for (var id in obj) { | |
try { | |
if (typeof(obj[id]) == "function") { | |
result.push(id + ": " + obj[id].toString()); | |
} | |
} catch (err) { | |
result.push(id + ": inaccessible"); | |
} |
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
// clang -framework Foundation -fobjc-arc -O3 test.m | |
#import <Foundation/Foundation.h> | |
@interface Slice : NSObject | |
@property NSInteger start; | |
@property NSInteger length; | |
@end | |
@implementation Slice |
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) Use http://defunkt.io/dotjs/ | |
* 2) Install this into ~/.js/github.com.js | |
* 3) Enjoy a button to edit any file on a pull request (some restrictions may apply, void where prohibited) | |
* | |
* Note: this will replace the "View file @ ...", which I find pretty useless (and it's contained in the edit mode, | |
* anyway). However, if you want to look at files where you don't have access to edit them, this will suck. | |
*/ | |
function getBranch() { |
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) Use http://defunkt.io/dotjs/ | |
* 2) Install this into ~/.js/github.com.js | |
* 3) Click on a line number in the editor to open the file at this position (e.g. to see more context) | |
* 4) Alt+Click on a line number in the editor to edit the file at this position | |
* | |
* This script is based on @agnoster's idea: https://gist.github.com/3906361 | |
*/ | |
function getBranch() { |
- André Kelpe | @fs111 | andre[at]concurrentinc[dot]com
- works for concurrent inc (http://concurrentinc.com)
- company behind Cacading and Lingual
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 | |
# Copyright bitly, Aug 2011 | |
# written by Jehiah Czebotar | |
DATAFILE="/var/tmp/nagios_check_forkrate.dat" | |
VALID_INTERVAL=600 | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 |
OlderNewer