start new:
tmux
start new with session name:
tmux new -s myname
Logfile RoATING file operations using UNIX logrotate utility. | |
============================================= | |
+ Rotate the log file when file size reaches a specific size | |
+ Continue to write the log information to the newly created file after rotating the old log file | |
+ Compress the rotated log files | |
+ Specify compression option for the rotated log files | |
+ Rotate the old log files with the date in the filename | |
+ Execute custom shell scripts immediately after log rotation | |
+ Remove older rotated log files |
# QEmu | |
brew install qemu | |
# Home for out tests | |
mkdir ~/arm-emu | |
cd ~/arm-emu | |
# Download initrd and kernel | |
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz |
Engine = require 'famous/core/Engine' | |
Surface = require 'famous/core/Surface' | |
View = require 'famous/core/View' | |
Transform = require 'famous/core/Transform' | |
RenderNode = require 'famous/core/RenderNode' | |
StateModifier = require 'famous/modifiers/StateModifier' | |
Easing = require 'famous/transitions/Easing' | |
Transitionable = require 'famous/transitions/Transitionable' | |
SpringTransition = require 'famous/transitions/SpringTransition' | |
WallTransition = require 'famous/transitions/WallTransition' |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
import redis | |
import threading | |
class Listener(threading.Thread): | |
def __init__(self, r, channels): | |
threading.Thread.__init__(self) | |
self.redis = r | |
self.pubsub = self.redis.pubsub() | |
self.pubsub.subscribe(channels) | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |