start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
__author__ = 'Frank Smit <frank@61924.nl>' | |
__version__ = '0.1.0' | |
import functools | |
import psycopg2 | |
from tornado.ioloop import IOLoop, PeriodicCallback |
-- Simple ray tracer implement in haskell. | |
-- Reference. | |
-- http://www.t-pot.com/program/92_RayTraceSphere/index.html | |
-- http://www.t-pot.com/program/94_RayTraceLighting/index.html | |
-- http://boegel.kejo.be/ELIS/Haskell/HRay/ | |
module Main where | |
import Debug.Trace (trace) | |
import Data.List (foldl') |
ps -A | grep diskimages-helper | awk '{print $1}' | xargs kill -9 |
# encoding: utf-8 | |
"""Module to connect to a kinect through ROS + OpenNI and access | |
the skeleton postures. | |
""" | |
import roslib | |
roslib.load_manifest('ros_skeleton_recorder') |
from threading import Thread | |
from Queue import Queue | |
import sqlite3 | |
class MultiThreadOK(Thread): | |
def __init__(self, db): | |
super(MultiThreadOK, self).__init__() | |
self.db=db | |
self.reqs=Queue() | |
self.start() |
# Configuring basic RADIUS on OS X 10.8 Server | |
# Jedda Wignall | |
# http://jedda.me | |
# Full writeup at: http://jedda.me/2012/11/configuring-basic-radius-os-108-server/ | |
# create the SACL for access to RADIUS | |
dseditgroup -q -o create -u <admin user> -n . com.apple.access_radius | |
# configure radiusd to log both successful and failed authentications |
To install virtualenv via pip | |
$ pip3 install virtualenv | |
Note that virtualenv installs to the python3 directory. For me it's: | |
$ /usr/local/share/python3/virtualenv | |
Create a virtualenvs directory to store all virtual environments | |
$ mkdir somewhere/virtualenvs | |
Make a new virtual environment with no packages |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 2"` |
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |