Skip to content

Instantly share code, notes, and snippets.

View subfuzion's full-sized avatar

Tony Pujals subfuzion

View GitHub Profile
@subfuzion
subfuzion / container-info.md
Last active October 11, 2020 18:47
Get Docker container IP and Port

Given a docker machine (started with docker-machine) and a docker-compose.yml file with a service (ex: web) that exposes a port (ex: 3000), get the address for a running container, ex:

$ addr web 3000
192.168.99.100:32768

If not running from directory containing docker-compose.yml, or if you want to use an alternative .yml file, specify the file pathname with the 3rd parameter, ex:

$ addr web 3000 path/to/common.yml
192.168.99.100:32768
@subfuzion
subfuzion / github-wiki-how-to.md
Last active March 13, 2025 09:40
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: [email protected]:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@subfuzion
subfuzion / .tmux.conf
Last active March 25, 2016 05:46
My .tmux.conf for tmux < v2.1
# Inspirations:
# http://mutelight.org/practical-tmux
# http://zanshin.net/2013/09/05/my-tmux-configuration/
# http://files.floriancrouzat.net/dotfiles/.tmux.conf
# http://stackoverflow.com/questions/9628435/tmux-status-bar-configuration
# https://github.com/Lokaltog/powerline
# https://github.com/remiprev/teamocil
# http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux
set -g default-terminal "screen-256color"
@subfuzion
subfuzion / curl.md
Last active April 19, 2025 09:46
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@subfuzion
subfuzion / .babelrc
Created January 20, 2016 20:13
Babel configuration
{
"presets": ["es2015"],
"plugins": ["syntax-async-functions","transform-regenerator"]
}
@subfuzion
subfuzion / .watch.js
Last active January 20, 2016 22:22
Using watch and glob - package.json example
var glob = require('glob');
var path = require('path');
// ===== files to watch =====
// this is just a simple glob example that could be done far more
// easily by using the following run script in package.json:
// "watch": "watch '<cmd>' ./src"
var pattern = './src/**/*';
var options = {};
@subfuzion
subfuzion / index.js
Last active January 19, 2016 20:31
requirebin sketch
// don't forget to open console to see output
var mm = require('minimatch');
var pattern = '**/src/**/*.js';
var options = {};
var tests = [
{ file: 'src', expect: true },
{ file: 'src/app.js', expect: true },
@subfuzion
subfuzion / docker-for-fun-and-profit.md
Last active December 29, 2015 22:31
Docker for Fun and Profit
@subfuzion
subfuzion / docker-orientation-for-node-developers.md
Last active April 3, 2023 11:58
Docker Orientation for Node Developers

Docker quick start for Node.js developers

Install Dependencies

Install Docker Toolbox

For Mac and Windows users, just install Docker Toolbox. It provides what you need to get started, including:

@subfuzion
subfuzion / docker-machine-ssh-command.md
Last active September 21, 2016 01:00
docker-machine ssh command for mongodump backup

Set up

Create a Docker data volume container

$ docker create --name dbdata -v /dbdata mongo /bin/true

Start mongo, expose port to connect

$ docker run -d --name mongo --volumes-from dbdata mongo