Skip to content

Instantly share code, notes, and snippets.

View legumbre's full-sized avatar

Leonardo Etcheverry legumbre

  • GlamST / Ulta
  • Montevideo, Uruguay
View GitHub Profile
@legumbre
legumbre / gist:5686967
Last active December 17, 2015 23:09
srecord intel hex padding
# pad up to 16K with zeros
srec_cat monitor.hex -intel -fill 0x00 0x0000 0x4000 -o foo.hex -intel -obs=1 -address-length=2 -enable=footer
@legumbre
legumbre / qemu-z80-mac.txt
Created May 31, 2013 15:53
building qemu-z80 on the mac
# compiling qemu-z80 on MacOS X
# - explicitly tell configure tu use gcc-4.2 since gcc now defaults to llvm-gcc
# - disable docs to enable installing from an out-of-tree build
./configure '--cc=gcc-4.2' '--prefix=/Users/leo/dev/qemu-z80/dist' '--target-list=z80-softmmu' '--disable-sdl' '--disable-kvm' '--disable-xen' '--disable-vnc-tls' '--disable-vnc-sasl' '--disable-curl' '--disable-bluez' '--disable-vde' '--disable-nptl' '--disable-kvm' '--disable-linux-user' '--disable-pthread' '--disable-docs'
(defun erc-format-privmessage (nick msg privp msgp)
"Format a PRIVMSG in an insertable fashion."
(let* ((mark-s (if msgp (if privp "*" "") "-"))
(mark-e (if msgp (if privp "*" ">") "-"))
(str (format "%s%s%s %s" mark-s nick mark-e msg))
(nick-face (if privp 'erc-nick-msg-face 'erc-nick-default-face))
(msg-face (if privp 'erc-direct-msg-face 'erc-default-face)))
;; add text properties to text before the nick, the nick and after the nick
(erc-put-text-property 0 (length mark-s) 'face msg-face str)
(erc-put-text-property (length mark-s) (+ (length mark-s) (length nick))
@legumbre
legumbre / gh-traceroute.txt
Created April 16, 2013 19:11
github traceroute
traceroute to github.com (204.232.175.90), 64 hops max, 52 byte packets
1 192.168.0.1 (192.168.0.1) 1.624 ms 3.548 ms 1.379 ms
2 puuni1bras2.antel.net.uy (200.40.22.11) 22.119 ms 21.815 ms 21.446 ms
3 ibb2uni2-7-3-93.antel.net.uy (200.40.22.133) 22.142 ms 21.932 ms 22.290 ms
4 r200-40-16-213.antel.net.uy (200.40.16.213) 21.592 ms 21.664 ms 22.239 ms
5 ibr3agu1-p1.antel.net.uy (200.40.18.38) 35.198 ms 24.057 ms 22.974 ms
6 so4-1-1-0-gramiana4.red.telefonica-wholesale.net (84.16.7.125) 167.841 ms 364.970 ms 168.449 ms
7 xe7-0-4-0-grtmiana2.red.telefonica-wholesale.net (94.142.126.186) 167.321 ms 167.647 ms
176.52.251.190 (176.52.251.190) 174.889 ms
8 176.52.249.153 (176.52.249.153) 169.501 ms
@legumbre
legumbre / sox_sample.txt
Last active December 14, 2015 17:18
sox sample
Samples read: 484181
Length (seconds): 21.958322
Scaled by: 2147483647.0
Maximum amplitude: 0.859467
Minimum amplitude: -0.903442
Midline amplitude: -0.021988
Mean norm: 0.056249
Mean amplitude: -0.000458
RMS amplitude: 0.101440
Maximum delta: 0.790161
@legumbre
legumbre / calc-example
Created March 6, 2013 15:46
plotting with calc
0,1,2,3,4,5,0,1,2,3,4,5,1,2,3,4,5
;; set the region to the previous line, then use 'C-x * g' to grab it in calc.
;; In calc, hit 'SPC' to duplicate the top of the stack:
;; 2: [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
;; 1: [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
;; Then use 'g f' to plot vector1 vs vector2
# splitting a *single file* into its own repo:
git filter-branch -f --prune-empty --index-filter "git rm --cached --ignore-unmatch $(git ls-files | grep -v SOMEFILE | xargs echo)"
test test
cañón
esto es utf8
test тест test
проверка
test test