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
// First example on image processing | |
// Finds the square with bigger difference from the latter | |
// Do it for both cams | |
// Guess that it's in the same object | |
// Tell the distance from the object | |
// Prototype to be further rewritten in OpenCV | |
// This code uses snippets form this great german website: | |
// http://www.creativecoding.org/lesson/topics/video/video-in-processing | |
// Aktivität in Bildbereichen feststellen in Processing | |
import processing.video.*; |
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
# one nice dude in the internet asked me for help to make this code work | |
# I leave this code here as a reminder of that nice dude. The content here | |
# belongs to nice dude, and not me. | |
import sys, traceback | |
import json | |
userQuited = False | |
def _quit(dummy): |
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
// A simple 'game' for Processing (tested with Processing 2.2.1) | |
// use ARROW KEYS to move | |
// this will be the pointers I'm going to use to sweep my map, | |
// and it's limit. | |
int xi, yi; | |
int i = 0; | |
int sceneHeight = 10; | |
int sceneWidth = 20; | |
// This is the "hero" coordinate |
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
// An easy way to generate random text from easy to type text | |
// | |
// Use "word word [possibility1|possibilities stuff|another stuff thing] stuff" | |
//to make a string with possibilities. | |
// Example: | |
// | |
//> var t = "A [greekish|futuristic|antique] world with a [dinossaur|ninja] flying" | |
//> console.log(randtext(t)) | |
//A antique world with a dinossaur flying | |
// |
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 | |
#lower case all files in running directory | |
for file in * | |
do | |
lowercase=`echo $file | tr '[A-Z]' '[a-z]'` | |
mv "$file" "$lowercase" | |
done |
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 | |
# Run this script WITHOUT Sudo. | |
# This script assumes you have installed transmission-daemon | |
# on your Raspberry Pi (or whatever where you are running it...) | |
# Running it will use cron to pause and unpause all your torrents | |
# at specific times. | |
# Right now you, no torrents will be downloaded from 5 am to 9 am and | |
# also no torrents will be downloaded from 5 pm to 11 pm. | |
THISFOLDER=`pwd` |
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 | |
# call using ./pinsched <time> <duration> <pin number> | |
# example: ./pinsched 14:00 2hours 5 | |
timeat="$1" | |
duration="$2" | |
ledpim="$3" | |
endtime=`date +%H:%M -d " $timeat today + $duration"` |
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 | |
REM Drag and drop markdown to docx converter | |
REM ======================================== | |
REM This script requires PANDOC to be installed. | |
REM | |
REM Usage | |
REM ----- | |
REM In Windows Explorer, drag a .md file on top of this script. | |
REM You can also call this script using: | |
REM md2docx.bat filename.md |
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
ffmpeg -start_number 1 -i IMG%04d.png -vf "scale=1920:1080" -b:v 8000k video.mp4 |
OlderNewer