Skip to content

Instantly share code, notes, and snippets.

View holms's full-sized avatar

Roman Gorodeckij holms

  • Unity-Technologies
  • United Kingdom
View GitHub Profile
@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
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);
@mallipeddi
mallipeddi / README
Created November 18, 2010 12:13
OpenVPN setup - server on Ubuntu & Tunnelblick on OS X (Snow Leopard)
# 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
@mlafeldt
mlafeldt / parse_yaml.py
Created October 13, 2011 15:44
[Python] Parse and pretty-print YAML
#!/usr/bin/env python
import sys
import yaml
import pprint
filename = sys.argv[1]
y = yaml.safe_load(open(filename, 'r'))
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 15, 2024 09:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

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