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
"use strict"; | |
const ffi = require("ffi"); | |
const ref = require("ref"); | |
const ArrayType = require("ref-array"); | |
const { createReadStream, createWriteStream, readSync, writeSync, closeSync } = require("fs"); | |
let IntArray = ArrayType("int"); | |
let StringArray = ArrayType("string"); | |
let voidPtr = ref.refType(ref.types.void); |
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
"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", []], |
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
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); |
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
// | |
// AppDelegate.swift | |
// Test3 | |
// | |
// Created by Chris Hinze on 28.05.15. | |
// Copyright (c) 2015 Chris Hinze. All rights reserved. | |
// | |
import Cocoa |
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
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 |
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
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> |
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
PS1="\[\033[1;31m\]\u\[\033[0m\] in \[\033[1;32m\]\w\[\033[0m\] on \[\033[1;35m\]\h\[\033[0m\]\n$ " | |
export PS1 |
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 <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; |
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 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")], | |
}; |
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 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) |