Skip to content

Instantly share code, notes, and snippets.

View krono's full-sized avatar

Tobias Pape krono

View GitHub Profile
@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
@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 / 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
#
# Automatically generated file; DO NOT EDIT.
# Freetz Configuration
#
FREETZ_HAVE_DOT_CONFIG=y
#
# User competence ------------------------
#
# FREETZ_USER_LEVEL_BEGINNER is not set
(Array streamContents: [:s |
(1 to: 998) do: [:x |
(1 to: 998) do: [ :y |
(1 to: 998) do: [:z |
((x+y+z) = 1000 and: [(x * x)+ (y*y) = (z*z)])
ifTrue: [s nextPut: {x.y.z}]]]]])
collect: [:a | [:x :y :z | x * y * z] valueWithArguments: a]

Keybase proof

I hereby claim:

  • I am krono on github.
  • I am krono (https://keybase.io/krono) on keybase.
  • I have a public key whose fingerprint is 5F8E 6A65 A617 6A07 B60A 8331 1957 A66A 08B5 F61C

To claim this, I am signing this object:

~/dev/Dijkstra/jpg % ll $(which pypy)
lrwxr-xr-x 1 tobias admin 31 3 Jun 09:45 /usr/local/bin/pypy -> ../Cellar/pypy/2.6.0_1/bin/pypy
[21:47:38]ζtobias@Claudio
~/dev/Dijkstra/jpg % ll /usr/local/Cellar/pypy/2.6.0_1/ ll /usr/local/Cellar/pypy/2.6.0_1/bin/
total 24
lrwxr-xr-x 1 tobias admin 35 3 Jun 09:45 easy_install_pypy -> ../../../../share/pypy/easy_install
lrwxr-xr-x 1 tobias admin 26 3 Jun 09:45 pip_pypy -> ../../../../share/pypy/pip
lrwxr-xr-x 1 tobias admin 19 2 Jun 21:48 pypy -> ../libexec/bin/pypy
[21:47:50]ζtobias@Claudio
~/dev/Dijkstra/jpg % ll /usr/local/lib/libQtCLucene.4.8.7.dylill /usr/local/lib/libpypy-c.dylib
Script started on Mon Aug 10 22:05:34 2015
(B]0;pompompom/]7;file:///tmp/pompompom%
(B(B[22:05:35]ζ(Btobias@claudio (B
/tmp/pompompom(B %(B vvirtualenv -p pypy
Running virtualenv with interpreter /usr/local/bin/pypy
You must provide a DEST_DIR
Usage: virtualenv.py [OPTIONS] DEST_DIR
@krono
krono / do.sh
Created August 10, 2015 20:19
virtualenv…
#!/bin/sh
# this was done a long time ago
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pypy
# use system python for virtualenv
sudo easy_install pip
# probably some updates here?
@krono
krono / cpp-id-shadowing.c
Last active October 2, 2015 11:50
ID shadowing?
struct {int foo;} snarfu;
/*
*/
#define WRAP(x) x
/*
*/
snarfu;
snarfu();
WRAP(snarfu);
WRAP(snarfu());