Skip to content

Instantly share code, notes, and snippets.

View imrehg's full-sized avatar
🐒
Chaos Monkey

Gergely Imreh imrehg

🐒
Chaos Monkey
View GitHub Profile
@imrehg
imrehg / gist:4617525
Created January 24, 2013 03:59
Temporary fix
var csv = '#Time(Unixtime),Frequency(nm),WavemeterTemperature(C)\n'; savedValues[chn].forEach(function(e) {
csv += e[0] + ',' + e[1] + ',' + e[2] + '\n';
}); var blob = new Blob([csv], {type: 'text/csv'}); var link = document.createElement('link'); link.href = window.URL.createObjectURL(blob); document.body.appendChild(link);
gSrpeWIT37E5bb6GFbAJ
http://site.ebrary.com/lib/ascc/docDetail.action?docID=10389547
@imrehg
imrehg / gist:4509295
Created January 11, 2013 09:31
Rendering settings for ffmpeg in Flowblade
f=mp4
s=1280x720
hq=1
acodec=libmp3lame
ab=384k
ar=48000
pix_fmt=yuv420p
vcodec=libx264
vpre=high
minrate=0
@imrehg
imrehg / normalize.sh
Created January 11, 2013 09:29
Normalize the audio for a video file and combine it back
#!/bin/bash
fullname=$1
filename=$(basename "$fullname")
extension="${filename##*.}"
filename="${filename%.*}"
if [ -f "audio.wav" ]
then
@imrehg
imrehg / doconvert.sh
Created January 11, 2013 09:28
Ignite talk conversion from PDF to PNG
#!/bin/bash
# Put all PDF in a single numbered directory on its own (from 01...)
# Change the upper limit here to the number of directories created
# Expcet Ignite style talk (that is 20 or so slides)
for i in {01..13}
do
cd $i
# find filename
@imrehg
imrehg / gist:4282881
Created December 14, 2012 05:27
Papers
http://www.sciencedirect.com/science/article/pii/0003491660901263
@imrehg
imrehg / gist:4014818
Created November 5, 2012 01:50
MongoDB basic conf
# mongodb.conf
# Where to store the data.
#dbpath=/var/lib/mongodb
#where to log
#logpath=/var/log/mongodb/mongodb.log
logappend=true
#bind_ip = 127.0.0.1
@imrehg
imrehg / bootloader_lilypad168.h
Created October 4, 2012 07:43
LilyPadBOOT_168.hex as header file for Atmega Board Programmer
// File = LilyPadBoot_168.hex
byte PROGMEM LilyPadBOOT_168_hex [] = {
0x0C, 0x94, 0x34, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C,
0x0C, 0x94, 0x4F, 0x1C, 0x0C, 0x94, 0x4F, 0x1C, 0x11, 0x24, 0x1F, 0xBE, 0xCF, 0xEF, 0xD4, 0xE0,
@imrehg
imrehg / digitalw.c.patch
Created October 3, 2012 07:04
Enabling PIC32-T795 in pinguino
diff --git a/p32/include/pinguino/core/digitalw.c b/p32/include/pinguino/core/digitalw.c
index dee0ffe..e10b1c0 100755
--- a/p32/include/pinguino/core/digitalw.c
+++ b/p32/include/pinguino/core/digitalw.c
@@ -89,17 +89,20 @@ const u32 pinmask[]={_2,_3,_0,_5,_6,_7,_8,_11, // 0-7
#ifdef PIC32_PINGUINO_T795
const u32 portmask[]=
- {pD,pD,pD,pD,pD,pD,pD,pD, // 0-7
- pB,pB,pG,pG,pG,pG,pB,pB, // 8-15