Skip to content

Instantly share code, notes, and snippets.

View munshkr's full-sized avatar

Damián Silvani munshkr

  • Buenos Aires, Argentina
  • 17:48 (UTC -03:00)
  • X @munshkr
View GitHub Profile
@munshkr
munshkr / 24-03-1976_-_10-12-1983.json
Created April 7, 2012 18:07
Script for scraping the lists from ANM (Archivo Nacional de la Memoria)
This file has been truncated, but you can view the full file.
[
{
"type": "forced_disappearence",
"surname_father": "ABACHIAN",
"surname_mother": "BEDROSSIAN",
"names": "JUAN CARLOS",
"files": [
{
"type": "CONADEP",
"number": "496"
@munshkr
munshkr / main.sh
Created March 21, 2013 14:57
Extension for [git-aware-prompt](https://github.com/jimeh/git-aware-prompt). Shows an "{S}" on the prompt to alert you of a non-empty stash.
source $DOTBASH/colors.sh
source $DOTBASH/prompt.sh
source $DOTBASH/stash.sh
@munshkr
munshkr / dspguide_scrape.sh
Last active December 19, 2015 10:58
Bash script for downloading all chapters from the book "The Scientist and Engineer's Guide to Digital Signal Processing" by Steven W. Smith, and merging them into a single PDF file. http://www.dspguide.com/
#!/bin/bash
# Download all chapters from the book "The Scientist and Engineer's Guide to
# Digital Signal Processing" by Steven W. Smith, and merge them into a single
# PDF file.
#
# Requirements: wget, pdftk
baseurl="http://www.dspguide.com"
tmpdir="/tmp"
mergefile="dspguide.pdf"
@munshkr
munshkr / marshal_sequel.rb
Last active August 29, 2015 13:59
Marshal for Sequel models
module Sequel
class Model
module InstanceMethods
def _dump(level)
Marshal.dump(values: values, new: new?, modified: modified?)
end
end
module ClassMethods
def _load(args)
@munshkr
munshkr / marshal_sequel_with_marshal_dump.rb
Created April 15, 2014 16:43
Marshal for Sequel models (using #marshal_dump and #marshal_load)
module Sequel
class Model
module InstanceMethods
def marshal_dump
marshallable!
Hash[instance_variables.map { |iv| [iv, instance_variable_get(iv)] }]
end
def marshal_load(variables)
variables.each { |k, v| instance_variable_set(k, v) }
@munshkr
munshkr / README.md
Last active August 29, 2015 14:10
Game of Life
@munshkr
munshkr / README.md
Last active August 29, 2015 14:10
Random walk

Random walk in two dimensions. Path is drawn with transparency to show more frequently traversed points darker than others.

@munshkr
munshkr / The C64 Digi
Last active November 13, 2024 10:17
The C64 Digi ~ C=Hacking #20
<=============
The C64 Digi
=============> Robin Harbron <[email protected]>
Levente Harsfalvi <[email protected]>
Stephen Judd <[email protected]>
Introduction
------------
Digis -- digitally sampled audio -- are fairly common on the 64. This is
@munshkr
munshkr / image.asm
Last active July 2, 2016 16:52
Programa autoejecutable para C64 Studio, imágenes en modo texto
;screen char data
!byte $f9,$f9,$e4,$a0,$a0,$a0,$e8,$e8,$e8,$e2,$e8,$e3,$f7,$c5,$c4,$c5,$20,$20,$20,$3d,$20,$e4,$f9,$e2,$e2,$78,$e2,$f9,$7b,$68,$e6,$68,$68,$20,$e4,$f9,$e2,$f9,$d2,$d2
!byte $62,$f8,$f8,$f7,$c4,$7e,$27,$3a,$22,$68,$20,$7c,$a0,$a0,$a0,$3a,$20,$20,$20,$3d,$20,$64,$6f,$79,$62,$f7,$f9,$f8,$f7,$6c,$6c,$20,$20,$5c,$f7,$f7,$e3,$e4,$e4,$a0
!byte $42,$7c,$a0,$a0,$69,$20,$20,$5c,$20,$27,$5c,$20,$4d,$20,$21,$3a,$20,$20,$20,$20,$20,$6c,$6c,$a0,$69,$20,$27,$20,$66,$6c,$6c,$6c,$20,$20,$5c,$e6,$f8,$62,$79,$79
!byte $21,$20,$a0,$e6,$20,$20,$20,$79,$4c,$20,$66,$64,$20,$2c,$20,$20,$20,$20,$20,$20,$20,$20,$20,$6a,$20,$20,$20,$20,$20,$20,$20,$20,$20,$5c,$20,$e6,$e6,$68,$68,$20
!byte $3a,$20,$20,$5c,$27,$6c,$e4,$ef,$e4,$a2,$ca,$e4,$65,$5c,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$68,$68,$68,$68
!byte $20,$20,$20,$3e,$2e,$69,$62,$20,$7b,$e1,$7b,$6c,$7e,$29,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$5c,$20,$20,$20,$20,$20,$20,$20,$68,$e6,$e6,$ec,$a0,$fb
!byt
@munshkr
munshkr / newrelic_sequel_test.rb
Created July 13, 2016 14:42
NewRelic Sequel test
require 'rubygems'
require 'sequel'
require 'newrelic_rpm'
# use NewRelic on DB
Sequel::Database.extension(:newrelic_instrumentation)
# connect to an in-memory database
DB = Sequel.sqlite
DB.logger = Logger.new(STDOUT)