Skip to content

Instantly share code, notes, and snippets.

View krono's full-sized avatar

Tobias Pape krono

View GitHub Profile
#
# Automatically generated file; DO NOT EDIT.
# Freetz Configuration
#
FREETZ_HAVE_DOT_CONFIG=y
#
# User competence ------------------------
#
# FREETZ_USER_LEVEL_BEGINNER is not set
@krono
krono / clang.s
Last active August 29, 2015 13:56
decompiled-clang
#clang.dylib:
#(__TEXT,__text) section
_f:
0000000000000f90 pushq %rbp
0000000000000f91 movq %rsp, %rbp
0000000000000f94 movl %edi, %eax
0000000000000f96 popq %rbp
0000000000000f97 ret
@krono
krono / clang.s
Last active August 29, 2015 13:56
get-int8-out-int32
.section __TEXT,__text,regular,pure_instructions
.globl _f
.align 4, 0x90
_f: ## @f
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
@krono
krono / 256color.diff
Created February 8, 2014 21:31
rpython fractal for 265 colors
diff -r 61a9f16c3e8b rpython/tool/ansi_mandelbrot.py
--- a/rpython/tool/ansi_mandelbrot.py Sat Feb 08 11:35:59 2014 +0100
+++ b/rpython/tool/ansi_mandelbrot.py Sat Feb 08 22:29:41 2014 +0100
@@ -14,8 +14,12 @@
"""
-palette = [39, 34, 35, 36, 31, 33, 32, 37]
-
+import os
#include <stdio.h>
void foo(void) {
static int barf=10;
barf++;
}
int main()
{
printf("test: %d\n", (int)foo());
@krono
krono / dotify-package-deps.st
Last active December 20, 2015 07:18 — forked from frankshearar/dotify-package-deps.st
Make a dot/graphviz-file from the package-dependencies in Squeak
| allDeps toDigraph |
"Avoid artifacts"
MCWorkingCopy flushObsoletePackageInfos.
PackageOrganizer default flushObsoletePackages: [:p |
p classes size = 0 and: [p methods size = 0]].
Smalltalk garbageCollect.
""
toDigraph := [:hash | | s |
s := WriteStream on: String new.
s nextPutAll: 'digraph {'; lf.
@krono
krono / fix-brew-outdated-gettext.sh
Created March 31, 2013 17:04
Gettext via brew was updated and the old one cleaned, yet, some libs still directly linked to the old gettext directly. This gist fixes this problems by reinstalling all affected packages.
#!/bin/bash
pushd /usr/local/lib
for package in $(
for i in *.dylib; do
if otool -L $i | grep -q gettext/0.18.1.1; then
# get pacakge out ouf library
echo $(basename $(dirname $(dirname $(dirname $(readlink $i)))));
fi;
from pypy.rlib.parsing.tree import Node as PyNode
from pypy.rlib.parsing.lexer import SourcePos
class Node(PyNode):
def __init__(self, source_position=None):
self.source_position = source_position or SourcePos(-1,-1,-1)
def __eq__(self, other): pass #...