start new:
tmux
start new with session name:
tmux new -s myname
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
# install openvpn | |
sudo apt-get install -y openvpn | |
# NAT 192.168.99.1/2 subnet <-> eth0 (interface on server) | |
sudo modprobe iptable_nat | |
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward | |
sudo iptables -t nat -A POSTROUTING -s 192.168.99.1/2 -o eth0 -j MASQUERADE | |
# generate secret key; scp this key to the client later |
#!/usr/bin/env python | |
import sys | |
import yaml | |
import pprint | |
filename = sys.argv[1] | |
y = yaml.safe_load(open(filename, 'r')) |
{ | |
"name": "**role-name**", | |
"chef_type": "role", | |
"json_class": "Chef::Role", | |
"default_attributes": {}, | |
"override_attributes": {}, | |
"description": "*role description*", | |
"run_list": [ | |
"role[default]", | |
"hoge::nice" |
//first in main controller | |
var myApp = angular.module('starter.controllers', []); | |
myApp.constant('mySettings', { | |
apiUri: '/api/foo', | |
nsUri: 'mySite/foo.xsd', | |
nsPrefix: 's' | |
}); |
#!/bin/bash | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
nginx: | |
rootdir: /data/installer | |
server-name: dev.domain.com |
bonus tip: for more darkness > https://darkreader.org/
version: "2" | |
services: | |
plex: | |
image: linuxserver/plex:latest | |
ports: | |
- 32400:32400 | |
- 32400:32400/udp | |
- 32469:32469 | |
- 32469:32469/udp |