See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
// Traverses an arbitrary struct and translates all stings it encounters | |
// | |
// I haven't seen an example for reflection traversing an arbitrary struct, so | |
// I want to share this with you. If you encounter any bugs or want to see | |
// another example please comment. | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Heye Vöcking | |
// |
### sqlmd | |
# Bash function for outputting SQLite results in Markdown-friendly table | |
### Dependency: | |
# csvlook can be found here: http://csvkit.readthedocs.io/en/540/scripts/csvlook.html | |
### USAGE | |
# $ sqlmd "SELECT name, age FROM people;" optional_db_name_argument.sqlite | |
### OUTPUT |
# Example makefile with some dummy rules | |
.PHONY: all | |
## Make ALL the things; this includes: building the target, testing it, and | |
## deploying to server. | |
all: test deploy | |
.PHONY: build | |
# No documentation; target will be omitted from help display | |
build: |
#cargo, docker hub without docker, how to
18 Jan 2015
###Background
I have been using linux containers for almost 2 years now. It started during an internship at Applidget, a startup in Paris. My job was to integrate linux containers technology in their private PaaS. At this time, there where no doubt, the technology to use was LXC. One week or so after I started digging into LXC, one of my co-worker talked to me about this new thing called docker. He told me "isn't it what you are supposed to do during your internship ?". And it was kind of it.
At this time I already highlighted a big challenge of containers in PaaS: creation time. Waiting for bundle install
to complete is already long enough to have to wait for another 40 secondes to create a container :). Docker landed just in time !
# this forces dpkg not to call sync() after package extraction and speeds up install | |
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup | |
# we don't need and apt cache in a container | |
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache |
#!/bin/bash -e | |
#### | |
# based on https://gist.github.com/jeffery/1115504 | |
# Helper script to update the Last modified timestamp of files in a Git SCM | |
# Projects working Copy | |
# | |
# When you clone a Git repository, it sets the timestamp of all the files to the | |
# time when you cloned the repository. | |
# | |
# This becomes a problem when you want the cloned repository, which is part of a |
# Create a user land file for testing. | |
# dd if=/dev/urandom of=/tmp/urandom bs=1M count=10 | |
# | |
# urandom-reads.py infile threads | |
# Examples: | |
# time python2.6 urandom-reads.py /tmp/urandom | |
# time python2.6 urandom-reads.py /dev/urandom | |
# | |
# R to generate a plot of the read time distribution at each level of concurrency | |
# rdt = read.csv("output.csv", header=F) |
# This gist is compatible with Ansible 1.x . | |
# For Ansible 2.x , please check out: | |
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6 | |
# - https://github.com/n0ts/ansible-human_log | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); }; | |
source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); }; | |
filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); }; | |
filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); }; | |
destination d_remote { tcp("central.syslog", port(514)); }; | |
log { source(s_nginx_20); filter(f_nginx_20); destination(d_messages); }; | |
log { source(s_nginx_21); filter(f_nginx_21); destination(d_messages); }; |