Skip to content

Instantly share code, notes, and snippets.

View kragen's full-sized avatar

Kragen Javier Sitaker kragen

View GitHub Profile
diff -urN vidalia-0.3.0-alpha/src//vidalia/bwgraph/GraphFrame.cpp vidalia-0.3.0-alpha-roundbandwidth/src//vidalia/bwgraph/GraphFrame.cpp
--- vidalia-0.3.0-alpha/src//vidalia/bwgraph/GraphFrame.cpp 2011-05-08 19:54:48.000000000 -0300
+++ vidalia-0.3.0-alpha-roundbandwidth/src//vidalia/bwgraph/GraphFrame.cpp 2012-02-16 15:57:43.565950942 -0300
@@ -15,6 +15,8 @@
#include "GraphFrame.h"
+#include <cmath>
+
#include <QtGlobal>

bash y el terminal

  • ^L
  • job control: ^Z, bg, fg, ^C, ^\
    • disown
    • kill -STOP, kill -CONT
  • reseteo de terminal: reset
  • historia de bash: ^R
  • ^X ^E
### Basic Sierpinski harmony bytebeat t & t >> 8 in as few bytes as possible:
.globl _start
_start: inc %ebx # output fd 1 in %ebx for write()
inc %edx # byte count of 1 in %edx for write()
loop: inc %eax # increment t each time through the loop
push %eax # save it on the stack
and %ah, %al # compute t & t >> 8, our output sample
push %eax # store it on the stack for write()
lea 3(%ebx), %eax # a three-byte way to set %eax to 4 (__NR_write)
mov %esp, %ecx # pass sample pointer to write() (little-endian!)
@kragen
kragen / club.md
Created January 5, 2012 01:25 — forked from anonymous/gist:1562923

Muchachos, soy Jorge, pegué el cuerpo del mail de Mateus haciendo el resumen de lo que hablamos. También un link muy interesante al final. Chequeen! abrz

En primer lugar, me parece que estamos acordados en dos puntos: vamos hacer una convocatoria cerrada para cerca de 15 personas, un grupo que debe incluir chicas (por favor). el segundo punto es que arrancaríamos en febrero, para aprovechar la baja temporada cultural y para empezar con la movida temprano en el año, incluso para generar programación en la casa abasto.

* Combining several of these: `f = ((t >> 11) % 63 ^ (0x15 + t >> 12)) %10*2%13*4, ((((t * f & 256) == 0) - 1 ^ t * f) & 255) >> ((t >> 7 + (t >> 13 & 1)) & 7)`
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Show a bandlimited Dirac delta.
I think I may have gotten something wrong here, because adding more
harmonics doesn’t shrink the envelope of the waves, it just increases
the apparent frequency of the oscillations.
"""
from pygame import *
This is how I solved
<https://www.ai-class.com/course/video/quizquestion/41>.
I wrote it with the Elisp at <https://gist.github.com/1308437>. If
you load that Elisp into your Emacs, you can tweak parameters and hit
F9 to update all the results.
Quiz question:
P(C) = 0.01.
P(Tᵢ|C) = 0.9.
;-----------------------------------------------------------
;
; --> DRAWARC.TEXT
;
; Routine to draw solid or hollow Ovals, RoundRects or Arcs.
;
;------------------------------------------------------
;
test!
@kragen
kragen / README.md
Created October 12, 2011 20:04
hello, world in C++ produces 2000+ lines of crap!

In response to this silly complaint. Have these people never before seen a compiler and linker?