Skip to content

Instantly share code, notes, and snippets.

View eiszfuchs's full-sized avatar
🦊
I may be slow to respond.

Raphael Pohl eiszfuchs

🦊
I may be slow to respond.
View GitHub Profile
function getPixel (x, y) {
var pixels = Picture.getPixel(x, y),
red = pixels[0],
green = pixels[1],
blue = pixels[2];
if (red > 128) {
red /= 2;
red += Math.random() * 0x33;
} else {
import re
import requests
from prettytable import PrettyTable
from pyquery import PyQuery as pq
url = "http://www.apple.com/"
p = re.compile(r'\W+')
r = requests.get(url)
document = pq(r.text)
(function (scope) {
var privateStaticProperty = null;
var privateStaticMethod = function () {
console.log("private hello");
};
var PublicClass = function () {
var self = this;
var glob = require("glob");
var fs = require("fs");
var optimizers = {
"clean-css": function (content) {
var optimizer = require("clean-css");
return new optimizer({}).minify(content);
},
"csso": function (content) {
(function (value, config) {
var matchbox = /{([^a-z]?)([a-z_]+)([^a-z|]?)(\|[^}]+)?}/g;
var translator = function (match, prefix, value, suffix, defaultValue) {
if (config.hasOwnProperty(value)) {
return prefix + config[value] + suffix;
}
if (defaultValue) {
return defaultValue.replace('|', '');
}
var gulp = require("gulp");
var debug = require("gulp-debug");
var request = require("request");
var source = require("vinyl-source-stream");
var streamify = require("gulp-streamify");
var prepend = require("gulp-header");
var uglify = require("gulp-uglify");
import hashlib
import math
import re
import struct
import wave
def remap_value(value, min_x, max_x, min_y, max_y):
normalized = (value - min_x) / float(max_x)
return min_y + (normalized * (max_y - min_y))
import arrow
import os
import shutil
import subprocess
import tarfile
import threading
import time
class Server:
import requests
class APIError:
pass
class Pyshbullet:
push_url = "https://api.pushbullet.com/v2/pushes"
@eiszfuchs
eiszfuchs / masonry_timeline.html
Created April 9, 2010 09:38
Fetch social feeds and display them. Live Demo: http://eisfuchslabor.de/playground/timeline/
<!DOCTYPE html>
<html lang="de">
<head>
<title>experiment : masonry timeline</title>
<meta charset="utf-8" />
<!-- icons via http://www.komodomedia.com/blog/2009/06/social-network-icon-pack/ -->
<style type="text/css">
body {
font-family: Tahoma;