Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
# Python/Twisted/Redis backed DNS server - resolves from NAME to IP addrs | |
# fallback to google or any other DNS server to resolv domains not present on Redis | |
# to set a new domain on redis, just issue a SET domain.tld ip_addr | |
# run with twistd -ny txredns.tac | |
# gleicon 2011 | |
from twisted.names import dns, server, client, cache | |
from twisted.application import service, internet | |
from twisted.internet import defer | |
from twisted.python import log |
import jester, asyncdispatch, os, osproc, strutils, json, threadpool, asyncfile | |
proc respondOnReady(fv: FlowVar[TaintedString], resp: Response) {.async.} = | |
while true: | |
if fv.isReady: | |
echo ^fv | |
var errorsFile = openAsync("tmp/errors.txt", fmReadWrite) | |
var logFile = openAsync("tmp/logfile.txt", fmReadWrite) | |
var errors = await errorsFile.readAll() |
DIFF_NUMBER=1 | |
while read -n1 -r -p "$DIFF_NUMBER:" && [[ $REPLY != q ]]; do | |
case $REPLY in | |
j) | |
DIFF_NUMBER=`expr $DIFF_NUMBER + 1` | |
;; | |
k) | |
DIFF_NUMBER=`expr $DIFF_NUMBER - 1` | |
;; |
import rethinkdb as r | |
import asyncio | |
r.set_loop_type("asyncio") | |
async def get_connection(): | |
return await r.connect("localhost", 28015) | |
async def changefeed_old(): |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
--- | |
# run this with ansible-playbook -i ansible_hosts bootstrap.yml -k -c paramiko | |
- hosts: jails_host | |
gather_facts: false | |
remote_user: root | |
tasks: | |
- name: install pkgng | |
raw: "pkg_info | grep -v 'pkg-' > /dev/null ; if $? pkg_add -r pkg; rehash ; pkg2ng; echo 'WITH_PKGNG=yes' >> /etc/make.conf; echo 'packagesite: http://pkgbeta.freebsd.org/freebsd%3A9%3Ax86%3A64/latest' >> /usr/local/etc/pkg.conf; pkg update ; pkg upgrade -y" | |
- name: install python27 | |
raw: "pkg install -y python27" |
#!/bin/sh | |
# | |
# $FreeBSD$ | |
# | |
# PROVIDE: enczfs | |
# REQUIRE: sshd | |
# BEFORE: iocage | |
# KEYWORD: shutdown | |
# |
set root=(cd0,msdos2) | |
multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0 cttyline=0 cttybaud=9600 | |
module /boot/minix_latest/mod01_ds.gz | |
module /boot/minix_latest/mod02_rs.gz | |
module /boot/minix_latest/mod03_pm.gz | |
module /boot/minix_latest/mod04_sched.gz | |
module /boot/minix_latest/mod05_vfs.gz | |
module /boot/minix_latest/mod06_memory.gz | |
module /boot/minix_latest/mod07_tty.gz | |
module /boot/minix_latest/mod08_mfs.gz |
#!/bin/env/python | |
# -*- encoding: utf8 -*- | |
# Move files based on file list in a md5 checksum file | |
# (c) Pekka Järvinen 2017- | |
import logging | |
log = logging.getLogger(__name__) | |
import os |
#!/usr/bin/env bash | |
# Install: | |
# ln -s $PWD/spotify-cmd.sh /usr/local/bin/spotify | |
ARG=$@ | |
usage () { | |
echo "Usage: $0 [play|pause|playpause|next track|previous track]" | |
} |