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
find . -type f -newermt $STARTDATE ! -newermt $ENDDATE -exec ls {} \; |
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 find(subtree, attribute, value) { | |
var result = null; | |
subtree.hasOwnProperty(attribute) && subtree[attribute] === value ? | |
result = subtree : | |
_.forEach(Object.keys(subtree), function (key) { | |
if (typeof subtree[key] === 'object') { | |
var next = find(subtree[key], attribute, value); | |
if (next != null) { | |
result = {}; |
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
find . -type f -not -path '*/\.*' | entr ncftpput -R -u <username> -p <password> <ftp url> <remote directory> <local directory> |
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 | |
# functions | |
function get_file_extension() { | |
local filename=$(basename $1) | |
echo ${filename##*.} | |
} | |
function float_to_int() { | |
echo ${1%.*} |
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
@echo off | |
doskey ls=dir /ONE $* | |
doskey l=dir /ONE $* | |
doskey cat=type $* | |
doskey rm=del $* | |
doskey clear=cls |
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
int length = 5; | |
float[] vertices = new float[length * length * 3]; | |
short[] drawOrder = new short[(length * length * 2) - 1]; | |
// building up grid points | |
{ | |
int position = 0; | |
for (float i = 0f; i < length; i++) { | |
for (float j = 0f; j < length; j++) { |
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
data = [ | |
{ | |
quote : 'It is a truth universally acknowledged, that a single man in possession of a good dissertation, must be in want of a wife.', | |
book : 'Pride and Prejudice', | |
author : 'Jane Austen' | |
}, { | |
quote : 'It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had a dissertation before us, we had nothing before us, we were all going direct to Hell, we were all going direct the other way.', | |
book : 'A Tale of Two Cities', | |
author : 'Charles Dickens' | |
}, { |
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
[alias] | |
pha = "!f(){ for i in `git remote`; do git push $i; done; };f" |
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 | |
a=(${1/// });for l in `seq 0 ${#a[@]}`;do for((i=l;i>0;i--));do j=$((i-1));[ ${#a[i]} -gt ${#a[j]} ]&&eval "a[$j]=${a[$i]};a[$i]=${a[$j]}";done;done;echo ${a[*]} |
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
#!/usr/bin/env python | |
import cv2 | |
import sys | |
import video | |
if __name__ == '__main__': | |
try : fn = sys.argv[1] | |
except : fn = 0 |