Skip to content

Instantly share code, notes, and snippets.

@fntlnz
fntlnz / wait-ready-service-docker.md
Created May 20, 2015 09:27
Wait for ready service in docker container
until nc -z $(docker inspect --format='{{.NetworkSettings.IPAddress}}' $CONTAINER_NAME) $SERVICE_PORT; do echo "waiting for service in container..."; sleep 0.5; done
@fntlnz
fntlnz / icu.md
Created January 15, 2015 15:23
Build ICU from source
wget http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
tar -xvf icu4c-54_1-src.tgz
cd icu/source
./configure
make -j
make install
@fntlnz
fntlnz / vdebug-docker
Created November 25, 2014 10:50
vdebug-docker
let g:vdebug_options = {"path_maps": {"/path/on/docker-container": "/path/on/host"}, "break_on_open": 0, "watch_window_style": "compact", "server" : "172.17.42.1"}
@fntlnz
fntlnz / types.php
Created August 21, 2014 14:33
Mime Types
<?php
$types = array(
"ai" => "application/postscript",
"aif" => "audio/x-aiff",
"aifc" => "audio/x-aiff",
"aiff" => "audio/x-aiff",
"asc" => "text/plain",
"atom" => "application/atom+xml",
"au" => "audio/basic",
"avi" => "video/x-msvideo",
@fntlnz
fntlnz / combinations.cpp
Created August 11, 2014 20:23
combinations
#include <iostream>
#include <vector>
void findCombinations(std::string c, std::string p, std::vector<std::string> &v) {
int i = 0;
int len = c.length();
if (p.length() < len) {
for (i = 0; i < len; i++) {
@fntlnz
fntlnz / establish-routing-to-docker-osx-container-network
Last active March 29, 2019 18:07 — forked from bhyde/establish-routing-to-boot2docker-container-network
establish-routing-to-docker-osx-container-network
#!/bin/bash
# Script to instruct the Mac how to route packets to the
# software defined network where containers created via boot2docker
# reside. This lets you casually directly to ports (ssh, http, etc. etc.)
# on those containers.
function ERROR(){ echo "ERROR: $*" ; }
function FAIL(){ echo "FAILING: $*" ; exit 1; }
IP_OF_DOCKER_HOST="172.16.42.43"
SDN_NET_FOR_CONTAINERS=$(docker-osx ssh -c 'ip route show' 2> /dev/null | awk '/docker0/{print $1}' )
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
modprobe -v btusb
echo "0b05 17cb" >> /sys/bus/usb/drivers/btusb/new_id