go get github.com/jeremija/appletv
appletv [apple-tv-host:port] [http-url-to-play]
Running from source:
# udev rules to be placed in /etc/udev/rules.d | |
# this is from https://github.com/lentinj/tp-compact-keyboard | |
SUBSYSTEM=="input", \ | |
ATTRS{name}=="ThinkPad Compact Bluetooth Keyboard with TrackPoint", \ | |
RUN+="/etc/udev/scripts/tp-compact-keyboard --fn-lock-enable" | |
# this is my script | |
SUBSYSTEM=="input", \ | |
ATTRS{name}=="ThinkPad Compact Bluetooth Keyboard with TrackPoint", \ |
// db/db.go
type MyDB struct {
DB *sql.DB
}
func Exec(query string, params... interface{}) error {...}
func Select(target interface{}, query string, params... interface) error {...}
#!/bin/bash | |
DOMAIN=$1 | |
MERGED="$DOMAIN-merged.crt" | |
echo "Generating private key for certificate signing request" > /dev/stderr | |
openssl genrsa -out $DOMAIN.key 2048 | |
echo "Creating a certificate signing request" > /dev/stderr | |
openssl req -new -key $DOMAIN.key -out $DOMAIN.csr \ |
{ | |
"libs": [], | |
"loadEagerly": [], | |
"plugins": { | |
"node": {}, | |
"es_modules": {}, | |
"module-resolver": { | |
"cwd": "packagejson", | |
"alias": { | |
"my-alias1": "./path/to/my/module1", |
'use strict' | |
const knex = require('knex') | |
const { expect } = require('chai') | |
const db = knex({ | |
client: 'sqlite3', | |
connection: ':memory:', | |
useNullAsDefault: true | |
}) | |
describe('raw', () => { |
local module = {} | |
module.debugging = false -- whether to print status updates | |
local eventtap = require "hs.eventtap" | |
local event = eventtap.event | |
local inspect = require "hs.inspect" | |
local keyHandler = function(e) | |
local watchFor = { |
'use strict'; | |
const pkg = require('./package.json'); | |
const _ = require('underscore'); | |
const fs = require('fs'); | |
const deps = {}; | |
fs.readFileSync('./deps').toString().split('\n').forEach(row => { | |
row = row.split('@'); | |
deps[row[0]] = row[1]; | |
}); |
sudo socat tcp-listen:80,reuseaddr,fork tcp:localhost:8080 |
function traverse(data) { | |
for (var objName in data) { | |
if (!data.hasOwnProperty(objName)) { | |
continue; | |
} | |
var obj = data[objName]; | |
if (typeof obj === 'object') { | |
console.log('obj: ' + objName + ' = {}...'); | |
this.traverse(obj); |