This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######### | |
# Path | |
######## | |
application/modules/selfcare/controllers/CdrController.php | |
########## | |
# Config: | |
########## | |
[production] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######### | |
# Path | |
######## | |
application/modules/selfcare/controllers/CdrController.php | |
########## | |
# Config: | |
########## | |
[production] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# tt -- a simple time tracker | |
# Version: 0.2.1 | |
import dateutil.parser | |
import datetime | |
import shlex | |
import sys | |
import sqlite3 |