Skip to content

Instantly share code, notes, and snippets.

@shinhyo
shinhyo / docker-compose.yml
Last active Sep 27, 2019
docker-compse plex, transmission
View docker-compose.yml
version: "2"
services:
plex:
image: linuxserver/plex:latest
ports:
- 32400:32400
- 32400:32400/udp
- 32469:32469
- 32469:32469/udp
@a7madgamal
a7madgamal / dark.md
Last active May 11, 2021
Dark mode for Slack on MacOS
View dark.md
View pillar-nginx-dev.sls
nginx:
rootdir: /data/installer
server-name: dev.domain.com
@bradrydzewski
bradrydzewski / generate_docker_cert.sh
Last active Mar 24, 2021
Generate trusted CA certificates for running Docker with HTTPS
View generate_docker_cert.sh
#!/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 \
@gabhi
gabhi / gist:9802312
Created Mar 27, 2014
Constants in angular
View gist:9802312
//first in main controller
var myApp = angular.module('starter.controllers', []);
myApp.constant('mySettings', {
apiUri: '/api/foo',
nsUri: 'mySite/foo.xsd',
nsPrefix: 's'
});
@futoase
futoase / chef-role-template.json
Created Jul 4, 2013
Chef role ひな形... (knife solo早くrole create対応してほしい)
View chef-role-template.json
{
"name": "**role-name**",
"chef_type": "role",
"json_class": "Chef::Role",
"default_attributes": {},
"override_attributes": {},
"description": "*role description*",
"run_list": [
"role[default]",
"hoge::nice"
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mlafeldt
mlafeldt / parse_yaml.py
Created Oct 13, 2011
[Python] Parse and pretty-print YAML
View parse_yaml.py
#!/usr/bin/env python
import sys
import yaml
import pprint
filename = sys.argv[1]
y = yaml.safe_load(open(filename, 'r'))
@mallipeddi
mallipeddi / README
Created Nov 18, 2010
OpenVPN setup - server on Ubuntu & Tunnelblick on OS X (Snow Leopard)
View README
# 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
@ryanflorence
ryanflorence / static_server.js
Last active Apr 28, 2021
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
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);