Skip to content

Instantly share code, notes, and snippets.

View Gottox's full-sized avatar

Enno T. Boland Gottox

View GitHub Profile
@Gottox
Gottox / WebsocketTransport.java
Created April 12, 2012 00:17
WebsocketTransport.java with Java-Websocket
package io.socket;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.util.regex.Pattern;
import net.tootallnate.websocket.WebSocketClient;
class WebsocketTransport extends WebSocketClient implements IOTransport {
@Gottox
Gottox / pdfthumb.js
Created October 24, 2012 20:22
Awesome PDF thumbnail creator
var pdfutils = require('pdfutils').pdfutils;
pdfutils(process.argv[2], function(doc, err) {
doc[0].asPNG({maxWidth: 200}).toFile(process.argv[3]);
});
diff -upr ttyrec-1.0.8/ttyplay.c ttyrec-1.0.8.patched/ttyplay.c
--- ttyrec-1.0.8/ttyplay.c 2006-06-11 17:52:50.000000000 +0200
+++ ttyrec-1.0.8.patched/ttyplay.c 2013-04-21 22:23:07.000000000 +0200
@@ -132,6 +132,26 @@ ttywait (struct timeval prev, struct tim
return speed;
}
+int dropCommands = 0;
+double
+ttyspacewait (struct timeval prev, struct timeval cur, double speed)
@Gottox
Gottox / gist:7353204
Last active December 27, 2015 16:09
Plain Javascript/HTML Client for MPD.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript">
function command(cmd) {
var http = new XMLHttpRequest();
var params = cmd+"\nclose\n";
var host = document.getElementById("host").value;
@Gottox
Gottox / 30c3.sh
Created December 27, 2013 09:21
Opens a stream from 30c3 on XBMC
#!/bin/bash
XBMC_HOST=pi1
XBMC_PORT=9090
# one of hq, lq
QUALITY=hq
###########################################################################
saal=$1
@Gottox
Gottox / -
Created March 12, 2014 14:34
~/src/xbps-packages/srcpkgs/openjdk(master ✗) xbps-src fetch
[*] Updating `http://repo.voidlinux.eu/current/x86_64-repodata' ...
[*] Updating `http://repo.voidlinux.eu/current/nonfree/x86_64-repodata' ...
=> openjdk-7u45_1: running do-fetch hook: 00-distfiles ...
=> openjdk-7u45_1: fetching distfile 'icedtea-2.4.5.tar.gz'...
looking up icedtea.classpath.org
connecting to icedtea.classpath.org:80
requesting http://icedtea.classpath.org/download/source/icedtea-2.4.5.tar.gz
302 redirect to http://icedtea.wildebeest.org/download/source/icedtea-2.4.5.tar.gz
looking up icedtea.wildebeest.org
@Gottox
Gottox / -
Created March 12, 2014 14:35
# Template file for 'openjdk'
pkgname=openjdk
version=7u45
revision=1
_icedtea_release=2.4.5
short_desc="open-source implementation of the seventh edition of the Java SE Platform."
maintainer="Enno Boland <[email protected]>"
homepage="http://icedtea.classpath.org/"
license="GPL2 with Classpath exception"
@Gottox
Gottox / -
Created March 12, 2014 15:39
diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index 48f9852..b49adec 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -11,7 +11,7 @@ hook() {
# Check that distfiles are there before anything else.
for f in ${distfiles}; do
- curfile=$(basename $f)
+ curfile=$(basename "${f#*>}")
@Gottox
Gottox / -
Created March 13, 2014 12:09
diff --git a/srcpkgs/chromium-pepper-flash/INSTALL b/srcpkgs/chromium-pepper-flash/INSTALL
index d1c66cf..d664786 100644
--- a/srcpkgs/chromium-pepper-flash/INSTALL
+++ b/srcpkgs/chromium-pepper-flash/INSTALL
@@ -1,11 +1,32 @@
#
-# This script will advise the user to read the license for Chrome
-# and to re-login to have environment variables set properly
+# This script will install the actual plugin, advise the user to read the
+# license for Chrome and to re-login to have environment variables set
@Gottox
Gottox / -
Created March 15, 2014 13:14
libpcre-8.34_3.x86_64.xbps.sig: 512B [avg rate: 16MB/s]
libpng-1.6.10_1.x86_64.xbps: 88KB [avg rate: 92MB/s]
libpng-1.6.10_1.x86_64.xbps.sig: 512B [avg rate: 41MB/s]
libssl-1.0.1f_3.x86_64.xbps: 826KB [avg rate: 530KB/s]
libssl-1.0.1f_3.x86_64.xbps.sig: 512B [avg rate: 17MB/s]
libxbps-0.33_3.x86_64.xbps: 87KB [avg rate: 167MB/s]
libxbps-0.33_3.x86_64.xbps.sig: 512B [avg rate: 17MB/s]
linux-firmware-network-20140222_1.noarch.xbps: 15MB [avg rate: 1722KB/s]
linux-firmware-network-20140222_1.noarch.xbps.sig: 512B [avg rate: 19MB/s]
linux-firmware-20140222_1.noarch.xbps: 6901KB [avg rate: 1450KB/s]