This file contains hidden or 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/env python3 | |
#-*- encoding: utf-8 -*- | |
import cv2 | |
import numpy as np | |
# start this: | |
# ffmpeg -i /dev/video0 -f mpegts udp://localhost:1337 | |
# ffmpeg -i rtsp://... -f mpegts udp://localhost:1337 |
This file contains hidden or 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
var handler = {} | |
handler.decode = function() { return JSON.parse(decodeURIComponent(location.hash.replace(/^#/, ""))); } | |
handler.encode = function(obj) { location.hash = "#" + encodeURIComponent(JSON.stringify(obj)); return location.hash; } |
This file contains hidden or 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
<html> | |
<head> | |
<link rel="search" type="application/opensearchdescription+xml" title="your search engine" href="/search.xml" /> | |
</head> | |
</html> |
This file contains hidden or 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
// window.location.toString() => "http://localhost:7777/?search=bla+bli+blubb+%40+%22wababab+%26%2B13%22" | |
var b = {}; | |
window.location.search.replace(/^\?/, "") | |
.split("&") | |
.map(function(e) { | |
var r = e.match(/([^=]+)=(.+)/); | |
return r ? [decodeURIComponent(r[1]), decodeURIComponent(r[2].replace(/\+/g, " "))] : [null, null]; | |
}) | |
.map(function(x) { b[x[0]] = x[1]; }); | |
b // = { search: "bla bli blubb @ "wababab &+13"" } |
This file contains hidden or 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
var w20 = function(x, y) { | |
var wurf = Math.floor(Math.random() * 20) + 1; | |
var mustbe = Math.floor(20 - 20 * x / y) + 1; | |
return {wurf: wurf, mustbe: mustbe, result: wurf >= mustbe}; | |
}; | |
for(var y = 1; y <= 20; y++) { | |
for(var x = 1; x <= y; x++) { | |
var result; | |
do { |
This file contains hidden or 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
*.swp | |
*.swo |
This file contains hidden or 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/sh | |
# Hole Predigturls der Christusgemeinde Wuppertal (http://meine-gemeinde.de/medien/predigten/) und speichere diese in eine M3U-Playlist. | |
echo "#EXTM3U" > CGW_PREDIGTEN.m3u | |
curl "http://meine-gemeinde.de/medien/predigten/" | grep 'param name="movie"' | sed -r 's/^.*value="([^"]+)".*$/\1/g' | sed -r 's/%2F/\//g' | sed -r 's/.*song_url=([^&]+).+song_title=([^\n]+)/#EXTINF:0,\2\nhttp:\/\/meine-gemeinde.de\/\1/g' >> CGW_PREDIGTEN.m3u |
This file contains hidden or 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
task :dev do | |
filedir = File.dirname(File.expand_path(__FILE__)) | |
system("docker run -it --rm -v #{ filedir }:/app -w='/app' ruby:2.2 /bin/bash") | |
end |
This file contains hidden or 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
#include <stdio.h> | |
void (*greeter(char greeting[]))(char[]) | |
{ | |
int intern_position = 1; | |
void result(char name[]) | |
{ | |
if(intern_position) return; | |
printf("%s, %s!\n", greeting, name); |
This file contains hidden or 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
#include <stdio.h> | |
const char gamer[3] = "XO"; | |
int same_size(char a[], char b[]) | |
{ | |
int i; | |
for(i = 0;; i++) { | |
if(a[i] == '\0' || b[i] == '\0') { | |
return a[i] == b[i]; |