Skip to content

Instantly share code, notes, and snippets.

View tzuryby's full-sized avatar

Tzury Bar Yochay tzuryby

View GitHub Profile
freeswitch@internal> 2010-01-07 11:20:04.960849 [DEBUG] sofia.c:4628 IP 87.68.244.32 Rejected by acl "domains". Falling back to Digest auth.
2010-01-07 11:20:05.94471 [DEBUG] sofia.c:4628 IP 87.68.244.32 Rejected by acl "domains". Falling back to Digest auth.
2010-01-07 11:20:05.94471 [NOTICE] switch_channel.c:602 New Channel sofia/internal/8898801@il.cellb.it [d75dfa40-fb6d-11de-9911-b7e694ca6e0b]
2010-01-07 11:20:05.94471 [DEBUG] switch_core_state_machine.c:398 (sofia/internal/8898801@il.cellb.it) Running State Change CS_NEW
2010-01-07 11:20:05.94471 [DEBUG] sofia.c:3289 Channel sofia/internal/8898801@il.cellb.it entering state [received][100]
2010-01-07 11:20:05.94471 [DEBUG] sofia.c:3296 Remote SDP:
v=0
o=- 60424594 60424594 IN IP4 20.0.0.122
s=-
c=IN IP4 87.68.244.32
@tzuryby
tzuryby / gist:279884
Created January 18, 2010 08:30
Paul Buchheit: Summarize your life in one word:
>>> sum([ord(c) for c in "your life"])
911
>>> import ctypes
>>> ctypes.c_uint32(911)
c_uint(911L)
# oz list and oz dump
freeswitch@snaptrunk-02> oz list
+OK
span: 1 (smg_prid)
type: Sangoma (boost)
chan_count: 30
dialplan: XML
context: default
#! /bin/sh
git add .
git commit -a
git push origin master
#!/usr/bin/env python
import os
import tornado.httpserver
import tornado.ioloop
import tornado.web
class StreamHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
#self.set_header("Content-Type", "application/ogg+ogg")
def main():
flag.Parse() // Scans the arg list and sets up flags
var s string = ""
for i= 0; i < flag.NArg(); i++:
if i > 0:
s += Space
s += flag.Arg(i)
if !*omitNewline:
mysql> select count(job_rowid) from results_links group by job_rowid;
+------------------+
| count(job_rowid) |
+------------------+
| 342 |
| 9267 |
| 211 |
| 10054 |
| 9811 |
| 281 |
16*2 lcd screen:
+----------------+
|ABCDEFGHIJKLMNOP|
|QRSTUVWXYZ012345|
+----------------+
we use 15 chars per line as last is reserved for active flag or "scroll-down" hint '>'
there are 4 keys, up down, enter and esc
always, the first line is the active one
(operation: "enter" applies on it)
+----------------+
tzury@precision:~/devel/tornadolog$ cat /dev/urandom | hexdump > /tmp/largefile.log
^C
tzury@precision:~/devel/tornadolog$ ls -lh /tmp/largefile.log
-rw-r--r-- 1 tzury tzury 131M 2011-02-27 09:50 /tmp/largefile.log
tzury@precision:~/devel/tornadolog$
tzury@precision:~/devel/tornadolog$ ./tornadolog.py
[I 110227 09:50:37 tornadolog:64] TornadoLog started. Point your browser to http://localhost:7777/tail
[I 110227 09:50:49 tornadolog:14] Info
[I 110227 09:50:49 web:756] 200 GET / (127.0.0.1) 0.78ms
[I 110227 09:50:56 tornadolog:14] Info
class SyscallThread(Thread):
def __init__(self, commandline):
Thread.__init__(self)
self.cursor = 0
self.lines = {self.cursor:[]}
self.keep_running=False
self.commandline=commandline
def run(self):
print 'starting thread:', self