go get github.com/jeremija/appletv
appletv [apple-tv-host:port] [http-url-to-play]
Running from source:
// 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 {...}
{ | |
"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]; | |
}); |
#!/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 \ |
sudo socat tcp-listen:80,reuseaddr,fork tcp:localhost:8080 |
<!-- updating input will update automatically update span --> | |
<input type="text" data-bind="value: observable"> | |
<span data-bind="text: observable"></span> | |
<!-- iterate over observableArray --> | |
<ul data-bind="foreach: observableArray"> | |
<li data-bind="text: $data"></li> | |
</ul> | |
<input type="text" data-bind="value: x"> |
#!/bin/bash | |
git log --oneline | grep 'prepare release' | while read line; do | |
COMMIT_ID=$(echo $line | cut -f 1 -d ' ') | |
VERSION=$(echo $line | sed 's/.*prepare release \(.*\)$/\1/g') | |
echo $COMMIT_ID is $VERSION | |
git tag "v$VERSION" $COMMIT_ID~1 | |
done |