Skip to content

Instantly share code, notes, and snippets.

View giniedp's full-sized avatar

Ginie giniedp

  • http://www.binarymolecule.com
  • Kiel, Germany
View GitHub Profile
@giniedp
giniedp / psikel-exporter.js
Last active April 15, 2019 17:12
Custom exporter from piskel app
(function() {
let saveByteArray = (function () {
let a = document.querySelector("a#js-download-button");
if (!a) {
a = document.createElement("a");
a.id = "js-download-button";
a.style = "display: none";
document.body.appendChild(a);
}
convert input.jpg -crop 640x480 frames/frame-%03d.jpg
@giniedp
giniedp / snapshot.js
Created June 9, 2017 19:46
Capture screenshot from html video element
(function(window) {
'use strict';
window.snapshot = function snap(video, width, height, download) {
video = video || window.document.getElementsByTagName('video')[0];
width = video.width || video.videoWidth;
height = video.height || video.videoHeight;
var canvas = window.document.createElement('canvas');
canvas.width = width;
canvas.height = height;
sudo mkdir /etc/racoon/remote
sudo mv /var/run/racoon/*.conf /etc/racoon/remote
sudo sed -i.bak 's/lifetime time 3600 sec/lifetime time 168 hours/' /etc/racoon/remote/*.conf
sudo patch /etc/racoon/racoon.conf <<EOF
--- /etc/racoon.orig/racoon.conf 2009-06-23 09:09:08.000000000 +0200
+++ /etc/racoon/racoon.conf 2009-12-11 13:52:11.000000000 +0100
@@ -135,4 +135,5 @@
# by including all files matching /var/run/racoon/*.conf
# This line should be added at the end of the racoon.conf file
# so that settings such as timer values will be appropriately applied.
find . -name '*.DS_Store' -type f -delete
@giniedp
giniedp / gist:08429cb27332c29bbec6
Created July 3, 2015 07:44
installation of therubyracer and libv8 on Yosemite
gem uninstall libv8
brew install v8
gem install therubyracer
gem install libv8 -v '3.16.14.3' -- --with-system-v8
@giniedp
giniedp / adb screenshot
Last active March 22, 2018 09:14
Screenshot with ADB
adb exec-out screencap -p > screen.png
tar xzvf icu4c-4_4_2-src.tgz
cd icu/source
chmod +x runConfigureICU configure install-sh
./runConfigureICU MacOSX
make
sudo make install
@giniedp
giniedp / gist:841007
Created February 23, 2011 19:37
unix quicktips
# clears all mails from sendmail queue
sudo postsuper -d ALL
@giniedp
giniedp / gist:665517
Created November 6, 2010 16:19
remove .svn directories (Windows)
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"