Skip to content

Instantly share code, notes, and snippets.

@dstrctrng
dstrctrng / hack.sh
Created March 31, 2012 18:24 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@dstrctrng
dstrctrng / encrypted-git-repo.md
Created August 23, 2012 00:28
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@dstrctrng
dstrctrng / ideal ops.md
Created February 7, 2013 08:40 — forked from bhenerey/ideal ops.md
Ideal Ops

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dstrctrng
dstrctrng / gist:5257727
Last active December 15, 2015 12:08
ubuntu-precise-image.sh
#!/bin/bash
# run as a non-root user on Ubuntu Precise
export DEBIAN_FRONTEND="noninteractive"
sudo aptitude -y install lxc bsdtar libsqlite3-dev git pkg-config
sudo aptitude -y install linux-image-extra-$(uname -r)
sudo aptitude -y install golang 0<&-
cd
root@c4a6608aaff6:~# ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:00 bash -c aptitude install -y openssh-server; mkdir -p /var/run/sshd; mkdir /root/.ssh; wget -O /root/.ssh/authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub ; /usr/sbin/sshd -d
511 ? S 0:00 sshd: root@pts/0
595 pts/0 Ss 0:00 \_ -bash
642 pts/0 R+ 0:00 \_ ps axf
root@f7586939fe50:~# ps axuf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 188 24 ? S 23:36 0:00 runsvdir -P /etc/service
root 514 0.0 0.0 164 4 ? Ss 23:36 0:00 runsv ssh
root 515 0.0 0.5 49956 2848 ? S 23:36 0:00 \_ /usr/sbin/sshd -D
root 516 0.0 0.7 73356 3628 ? Ss 23:37 0:00 \_ sshd: root@pts/0
root 600 0.8 0.8 23204 4440 pts/0 Ss 23:37 0:00 \_ -bash
root 635 0.0 0.2 18128 1124 pts/0 R+ 23:37 0:00 \_ ps axuf
root 1378 0.1 2.2 486092 11344 ? Ssl 07:00 0:04 /usr/local/bin/docker -d
root 1539 0.0 0.2 21164 1132 ? S 07:01 0:00 \_ /usr/bin/lxc-start -n 687378f63f96399519662486e439c4c524574da8bb180058ca71aca570641031 -f /var/lib/docker/containers/687378f63f96399519662486e439c4c524574da8bb180058ca71a
root 1544 0.0 0.0 188 24 ? S 07:01 0:00 | \_ runsvdir -P /etc/service
root 1575 0.0 0.0 164 4 ? Ss 07:01 0:00 | \_ runsv ssh
root 1576 0.0 0.5 49956 2844 ? S 07:01 0:00 | \_ /usr/sbin/sshd -D
root 3887 0.0 0.2 21164 1160 ? S 07:40 0:00 \_ /usr/bin/lxc-start -n 24e1604df2befa7de335e14c991c9b6b99b609192c881d13f6e51fe92d08fe41 -f /var/lib/docker/containers/24e1604df2befa7de335e14c991c9b6b99b609192c881d13f6e51
root 3894 0.0 0.0 188 32 ? S 07:40 0:00 \_ runsvdir -P /etc/service
root 3925 0.0 0.0 164 4 ? Ss 07:40 0:00
PID TTY STAT TIME COMMAND
1 ? S 0:00 runsvdir /etc/service
4 ? S 0:00 runsv nginx
8 ? S 0:00 \_ nginx: master process nginx -g daemon off;
17 ? S 0:00 \_ nginx: worker process
18 ? S 0:00 \_ nginx: worker process
19 ? S 0:00 \_ nginx: worker process
20 ? S 0:00 \_ nginx: worker process
5 ? S 0:00 runsv memcached
10 ? Sl 0:00 \_ memcached -u memcache
2538 ? S 0:00 | | \_ nginx: master process nginx -g daemon off;
2547 ? S 0:00 | | \_ nginx: worker process
2548 ? S 0:00 | | \_ nginx: worker process
2549 ? S 0:00 | | \_ nginx: worker process
2550 ? S 0:00 | | \_ nginx: worker process
2535 ? S 0:00 | \_ runsv memcached
2541 ? Sl 0:00 | | \_ memcached -u memcache
2536 ? S 0:00 | \_ runsv redis
2540 ? S 0:00 | | \_ redis-server
2537 ? S 0:00 | \_ runsv ssh