start new:
tmux
start new with session name:
tmux new -s myname
| /* compile with: | |
| on linux: gcc -g stack_traces.c | |
| on OS X: gcc -g -fno-pie stack_traces.c | |
| on windows: gcc -g stack_traces.c -limagehlp | |
| */ | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <assert.h> |
| try: | |
| import pika | |
| from pika.adapters.tornado_connection import TornadoConnection | |
| except ImportError: | |
| pika = None | |
| try: | |
| import tornado | |
| import tornado.ioloop | |
| except ImportError: |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| user nobody; | |
| worker_processes auto; | |
| error_log logs/error.log notice; | |
| worker_rlimit_nofile 65535; | |
| pid /var/run/nginx.pid; | |
| events { | |
| accept_mutex off; |
| → git remote prune origin | |
| → git branch --merged | grep -v "\*" | xargs -n 1 git branch -d | |
| # Remember to do this from the master branch | |
| # If you run it from a feature branch the master branch gets deleted. | |
| → git branch --merged | grep -v "\*" | xargs -n 1 git branch -d | |
| Deleted branch master (was 644eb76). | |
| You can recheckout master branch | |
| → git checkout -b master origin/master |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
These rules are adopted from the AngularJS commit conventions.
| #!/usr/bin/python | |
| import datetime | |
| import logging | |
| import threading | |
| import weakref | |
| import tornado | |
| import tornado.gen | |
| import pika |