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: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
http://site.ebrary.com/lib/ascc/docDetail.action?docID=10389547
gSrpeWIT37E5bb6GFbAJ
@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);
http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1578584&abstractAccess=no&userType=inst
http://ieeexplore.ieee.org/Xplore/defdeny.jsp?url=http%3A%2F%2Fieeexplore.ieee.org%2Fstamp%2Fstamp.jsp%3Ftp%3D%26arnumber%3D1300723%26userType%3Dinst&denyReason=-134&arnumber=1300723&productsMatched=null&userType=inst
http://ieeexplore.ieee.org/Xplore/defdeny.jsp?url=http%3A%2F%2Fieeexplore.ieee.org%2Fstamp%2Fstamp.jsp%3Ftp%3D%26arnumber%3D800029%26userType%3Dinst&denyReason=-134&arnumber=800029&productsMatched=null&userType=inst
###
http://www.ixys.com/PSpice_Model/IGBT_TYPE/Discrete_IGBT_High_Speed_Series.html
http://www.electronicspoint.com/igbt-model-ltspice-t43052.html
http://www.st.com/web/en/catalog/sense_power/FM100/CL826
http://www.infineon.com/cms/en/product/igbts/igbt-with-anti-parallel-diode/channel.html?channel=ff80808112ab681d0112ab6a6bd104f4
http://www.hindawi.com/journals/apec/1998/089240/abs/
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@imrehg
imrehg / likes.py
Created May 3, 2013 03:15
Facebook likes from web sent to wireless Arduino
import urllib2 # for requests
import simplejson # for JSON conversion
import sys # for command line arguments
import time # for delays
# Get the page FB ID string from 1st command line argument
pagename = sys.argv[1]
# Download the page data into python dict
url = "http://graph.facebook.com/%s" %(pagename)
We can't make this file beautiful and searchable because it's too large.
#Unix timestamp, temperature (C), pressure (Pa)
1373521583.53,27.9,100676
1373521583.54,27.9,100673
1373521583.55,27.9,100685
1373521584.23,27.9,100682
1373521585.24,27.9,100664
1373521586.26,27.9,100676
1373521587.27,27.9,100670
1373521588.28,27.9,100679
1373521589.30,27.9,100679
@imrehg
imrehg / QREncrypter.cs
Last active December 16, 2020 08:46
QR code encryption code for Taiwanese electronic invoice
namespace tw.gov.nat.einvoice.qrutil {
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
public class QREncrypter {
public string AESEncrypt(string plainText, string AESKey) {
byte[] bytes = Encoding.Default.GetBytes(plainText);
ICryptoTransform transform = new RijndaelManaged { KeySize = 0x80, Key = this.convertHexToByte(AESKey), BlockSize = 0x80, IV = Convert.FromBase64String("Dt8lyToo17X/XkXaQvihuA==") }.CreateEncryptor();
@imrehg
imrehg / Automation.py
Created October 25, 2013 05:18
Automation
##################################
from vcScript import *
comp = getComponent()
def OnSignal( signal ):
global componentEntering, queue, portIndex
# When component is trying to pass the transfer the index of the port is added to request queue
if signal == componentEntering:
queue.append([portIndex.Value, componentEntering.Value]) # list of lists ~ [index, part]