This file contains 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
# Other code goes here | |
def run(): | |
pass | |
# ... | |
def main(): | |
global nailgun | |
while True: | |
try: |
This file contains 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
# Use like: python setx.py my_python_program [args...] | |
# | |
# my_python_program can be a literal path to a file (e.g., foo.py), or the unqualified | |
# name of a Python program in PATH. In the latter case, setx.py examines PATH for | |
# a program with that name. | |
# | |
# Prints every line executed, including the filename and line number. | |
# | |
# This is a hacky prototype for py27; it almost certainly breaks in significant ways on | |
# non-Unix, or Python3000; and has only been tested on a FreeBSD derivative. It still |
This file contains 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
import os | |
import sys | |
# Re-opens the file-like stream of string 'attr' in parent object 'pobj' with | |
# the open() builtin parameters 'args' and 'kwargs'. Unix-specific. | |
# | |
# I would love it if there was a better way to do this and I just missed it. | |
def set_stream_errorh(pobj, attr, *args, **kwargs): | |
obj = getattr(pobj, attr) | |
fileno = obj.fileno() |
This file contains 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
# create new (empty) log files after rotating old ones | |
create | |
# use date as a suffix of the rotated file | |
dateext | |
compress | |
compresscmd /bin/zstd | |
compressext .zst | |
compressoptions -18 -T0 --rm |
This file contains 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
Thread 6 (Thread 801e1a800 (LWP 100957)): | |
#0 do_xor_speed (tmpl=0x9b70c0 <xor_block_8regs>, b1=0x805c68000, b2=0x805c6b000) at crypto/xor.c:84 | |
#1 0x0000000000688a1c in calibrate_xor_blocks () at crypto/xor.c:144 | |
#2 0x0000000000680ac3 in do_one_initcall (fn=0x6889bf <calibrate_xor_blocks>) at init/main.c:794 | |
#3 0x0000000000680c7b in do_initcall_level (level=<optimized out>) at init/main.c:859 | |
#4 do_initcalls () at init/main.c:867 | |
#5 do_basic_setup () at init/main.c:885 | |
#6 kernel_init_freeable () at init/main.c:1010 | |
#7 0x000000000067d799 in kernel_init (unused=0x9b70c0 <xor_block_8regs>) at init/main.c:938 | |
#8 0x0000000000404548 in thread_bootstrap (_tba=0x805c1e138) at arch/lkl/kernel/threads.c:139 |
This file contains 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 perl | |
# Extracted from 2-clause BSDL https://www.freebsd.org/cgi/man.cgi/source | |
# | |
# Usage example: | |
# $ man 3 tree | path/to/man2html.pl > tree.3.html | |
# encode unknown text data for using as HTML, | |
# treats ^H as overstrike ala nroff. | |
sub encode_data { |
This file contains 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
$ ./blah | |
*** Error in `./blah': free(): invalid next size (fast): 0x0000000001632010 *** | |
======= Backtrace: ========= | |
/lib64/libc.so.6(+0x75a4f)[0x7f803d638a4f] | |
/lib64/libc.so.6(+0x7cd78)[0x7f803d63fd78] | |
./blah[0x404830] | |
./blah[0x4047fe] | |
./blah[0x4044b2] | |
./blah[0x404131] | |
./blah[0x402720] |
This file contains 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
version: 3.6.0-194-gd49cb68b9e8b57169240e16686f4f60d6b5a089f | |
epoch: 1 | |
thread.arena: 0 | |
thread.allocated: 0 | |
thread.allocatedp: 140346141230912 | |
thread.deallocated: 0 | |
thread.deallocatedp: 140346141230920 | |
thread.tcache.enabled: 1 | |
thread.tcache.flush: <error(1): Operation not permitted> | |
thread.prof.name: <error(2): No such file or directory> |
This file contains 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
#include <sys/mman.h> | |
#include <sys/param.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sysexits.h> |
This file contains 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
#pragma warning(disable:4996) | |
#include<stdio.h> | |
#include<algorithm> | |
#include<vector> | |
#include<time.h> | |
using namespace std; | |
int w[1001], // instance of vector for creating distribution | |
C[1001][1001], // histograms per output bucket | |
O[1001]; // an "output," used only for inputting lines |
NewerOlder