View fork.js
"use strict"; | |
const ffi = require("ffi"); | |
const ref = require("ref"); | |
const ArrayType = require("ref-array"); | |
let StringArray = ArrayType("string"); | |
let voidPtr = ref.refType(ref.types.void); | |
let stdlib = ffi.Library(null, { | |
"fork": ["int", []], |
View libc.js
const { syscall, getAddress } = require("libsys"); | |
const os = require("os"); | |
if (os.endianess() != "LE") | |
throw "only little endian supported"; | |
let dontGC = []; | |
function ref(buffer) { | |
dontGC.push(buffer); | |
return getAddress(buffer); |
View AppDelegate.swift
// | |
// AppDelegate.swift | |
// Test3 | |
// | |
// Created by Chris Hinze on 28.05.15. | |
// Copyright (c) 2015 Chris Hinze. All rights reserved. | |
// | |
import Cocoa |
View gist:4b2f24a3f3c2b1e5113cc73c646380bb
a52dec 0.7.4-9 | |
aalib 1.4rc5-12 | |
acl 2.2.52-2 | |
alsa-firmware 1.0.29-1 | |
alsa-lib 1.1.1-1 | |
alsa-plugins 1.1.1-1 | |
alsa-utils 1.1.1-1 | |
alsaplayer 0.99.81-8 | |
attr 2.4.47-1 | |
autoconf 2.69-3 |
View Dockerfile
FROM ubuntu | |
RUN apt-get update && apt-get install -y x11vnc xvfb firefox | |
RUN mkdir ~/.vnc | |
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd | |
RUN bash -c 'echo "firefox"' >> /.bashrc | |
EXPOSE 5900 | |
CMD ["x11vnc", "-forever", "-usepw", "-create"] | |
# on osx: $ open vnc://docker:<port> |
View .bashrc
PS1="\[\033[1;31m\]\u\[\033[0m\] in \[\033[1;32m\]\w\[\033[0m\] on \[\033[1;35m\]\h\[\033[0m\]\n$ " | |
export PS1 |
View gist:5f6e23cf0c02652f7d92
#include <ESP8266WiFi.h> | |
const char* ssid = "..."; | |
const char* password = "..."; | |
const IPAddress ip(10, 0, 0, 14); | |
const IPAddress gateway(10, 0, 0, 1); | |
const IPAddress subnet(255, 255, 0, 0); | |
const char* host = "10.0.1.1"; | |
const int port = 8889; |
View tls-hpkp.js
var tls = require("tls"); | |
var fs = require("fs"); | |
var crypto = require("crypto"); | |
var options = { | |
host: "test.dev", | |
port: 8888, | |
ca: [fs.readFileSync("cert.pem"), fs.readFileSync("cert2.pem")], | |
}; |
View gist:2ca9b9a425b8ed0d9ec4
var path: NSString = NSWorkspace.sharedWorkspace().absolutePathForAppBundleWithIdentifier("com.apple.dt.xcode")! | |
var icon: NSImage = NSWorkspace.sharedWorkspace().iconForFile(path) | |
var data: NSData = icon.TIFFRepresentation! | |
var bitmap: NSBitmapImageRep = NSBitmapImageRep(data: data)! | |
data = bitmap.representationUsingType(NSBitmapImageFileType.NSPNGFileType, properties: [:])! | |
var base64: NSString = "data:image/png;base64," + data.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.allZeros) | |
println(base64) |
View musterlösungen-index
Wahrheitstafeln | |
1P1, 1A1 | |
Aussagenlogik | |
1P2, 1A2, 2P3, 2A3, 2P2, 2A2 | |
Quantoren | |
1P3, 1A3 | |
Mengenoperationen |