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
framework 'Cocoa' | |
framework 'avfoundation' | |
class FaceDetectionDelegate | |
attr_accessor :window | |
def applicationDidFinishLaunching(aNotification) | |
width = 1280 | |
height = 720 |
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
s = 1 | |
gifts.split("\n")[-day..-2].each{|l| s += l.to_i} | |
s |
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
# for spyshell | |
function zshexit() { | |
cat /Users/`whoami`/.termlogs/`date +%Y-%m-%d`.txt | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > temp | |
mv temp /Users/`whoami`/.termlogs/`date +%Y-%m-%d`.txt | |
exit | |
} |
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
nnoremap n n:call Recenter(15)<CR> | |
nnoremap N N:call Recenter(15)<CR> | |
function! Recenter(tolerance) | |
if (abs(winline()-winheight(0)/2)>a:tolerance) | |
exe 'norm! zz' | |
endif | |
endfunction |
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
" pvinis | |
""" Intro | |
set nocompatible " viMproved | |
" Needed for vundle, will be turned on after vundle inits | |
filetype off | |
" Setup vundle |
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
;; Cyberpunk Colour Theme | |
;; | |
;; "and he'd still see the matrix in his sleep, bright lattices of logic | |
;; unfolding across that colorless void..." | |
;; William Gibson, Neuromancer. | |
;; | |
(require 'color-theme) | |
;;;###autoload |
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
package stringcase | |
import "testing" | |
func equal(a, b []string) bool { | |
if len(a) != len(b) { | |
return false | |
} | |
for i, v := range a { | |
if v != b[i] { |
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
func (sh *Shell) Loop() { | |
sc := bufio.NewScanner(os.Stdin) | |
printPrompt() | |
for sc.Scan() { | |
line := sc.Text() | |
if line == "start" || line == "st" { | |
sh.startStop <- true | |
} else if line == "stop" { | |
sh.startStop <- false | |
} else if line == "exit" { |
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
#![feature(associated_types)] | |
extern crate time; | |
fn main() { | |
println!("hello :)"); | |
//println!("{}", time::now()); | |
} |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <OpenCL/opencl.h> | |
int main(int argc, char* const argv[]) { | |
cl_uint num_devices, i; | |
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 0, NULL, &num_devices); | |
cl_device_id* devices = calloc(sizeof(cl_device_id), num_devices); |