Skip to content

Instantly share code, notes, and snippets.

a = ('val', 1, 1)
b = ('list', 2, [a, a])
c = ('val', 3, 2)
l = [a,b,a,c]
def gen(l, known):
for type, id, val in l:
if id not in known:
if type == 'list':
for inner_val in gen(val, known):
$ bup init
Initialized empty Git repository in /tmp/.bup/
$ dd if=/dev/urandom of=foo count=10 bs=1M
$ bup index .
Indexing: 2, done.
$ bup save -n purge-demo .
Reading index: 2, done.
$ bup init
Initialized empty Git repository in /tmp/.bup/
$ dd if=/dev/urandom of=foo count=10 bs=1M
$ bup index .
Indexing: 2, done.
$ bup save -n repack-demo .
Reading index: 2, done.
#!/usr/bin/env python
from telnetlib import Telnet
import sys
def submit(flag):
t = Telnet("localhost", 8888)
t.read_very_eager()
t.write(flag)
result = t.read_very_eager()
#########
# Path
########
application/modules/selfcare/controllers/CdrController.php
##########
# Config:
##########
[production]
#########
# Path
########
application/modules/selfcare/controllers/CdrController.php
##########
# Config:
##########
[production]
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
class MessageReceiver(object):
def __init__(self, message_handler):
self.message_handler = message_handler
def listen(self):
pass
class MessageHandler(object):
def handle_message(self, message):
zz@trunks 10:47 [130]» java -jar build/source.jar -b 127.0.0.1:3002
Options required but not given:
s, stream, The stream that is served by the source.
Usage: source.jar [--bind hostname[:port]] [--tracker hostname[:port]] --stream StreamIdentifier
Required parameters:
-s, --stream The stream that is served by the source.
Optional parameters:
-v, --verboseMakes output more verbose (can be used multiple times).
#!/usr/bin/env python2
# tt -- a simple time tracker
# Version: 0.2.1
import dateutil.parser
import datetime
import shlex
import sys
import sqlite3