Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am ageldama on github.
* I am ageldama (https://keybase.io/ageldama) on keybase.
* I have a public key whose fingerprint is 6443 D0A3 9924 7792 A60B 75E4 ECDF 560A D040 7B6F
To claim this, I am signing this object:
;;;; ~/.xbindkeysrc.scm
(xbindkey '("b:10") "xdotool key Next")
(xbindkey '("b:11") "xdotool key Prior")
(defun tokenize (s &key emit-fn)
(let ((lexer-fn (lexer s)))
(loop :with token :and val
:do (setf (values token val) (funcall lexer-fn))
:while (not (null token))
:if (null emit-fn)
:collect (cons token val)
:else
:do (funcall emit-fn token val))))
m.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
3 | main() {
| ^~~~
m.c: In function ‘main’:
m.c:4:16: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
4 | printf("%p\n", malloc(0));
| ^~~~~~
m.c:4:16: warning: incompatible implicit declaration of built-in function ‘malloc’
m.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
1 | #include <stdio.h>
https://www.dropbox.com/s/kbrtnj9bkc84jqu/%25ED%2594%25BC%25EB%25B6%2580%25EC%2596%2591%25EC%259E%2590%252B%25EC%259E%2590%25EA%25B2%25A9%2528%25EC%25B7%25A8%25EB%2593%259D%25E3%2586%258D%25EC%2583%2581%25EC%258B%25A4%2529%25EC%258B%25A0%25EA%25B3%25A0%25EC%2584%259C%252B%25281%2529.pdf?dl=0
@ageldama
ageldama / gist:8ca06a83445ddffee86b3aa77cbc05e3
Created May 29, 2019 11:41
GPG Public-Key: Jong-Hyouk Yun (Home, Desktop) <ageldama@gmail.com>
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFzub1EBCADiseW+SnpoWRSCAN0T8f12zfHjwQOU0AAkpOg/Jd+v6TM8eUOf
jr3VBz2KU55OXDhY3Jjrl7KgbmuOHIqhLY7Gug3Ohf/WKBxFDDZAxUBytghs3a+6
zngMF8dkQI/6dRX942P7M8gpIr3MHPihjxRbpnD7lx7UIMmWC3SwBtXmOO7E6Rvk
LNrUh8M5MjKSV8fn3UU0uhQYNDeuNTCwMhrKqLoHOVX+JMmFs+XLBPotGESxKuzB
two/cRH08oASdFYNAFE6nRrnh7sp9H9RNZIraJbijNtc49XCke6wesev9l4sYVs3
HWRROgT6kUUDN28NYa9OFlx1I9NwNIRdtaXPABEBAAG0M0pvbmctSHlvdWsgWXVu
IChIb21lLCBEZXNrdG9wKSA8YWdlbGRhbWFAZ21haWwuY29tPokBVAQTAQgAPhYh
BGRD0KOZJHeSpgt15OzfVgrQQHtvBQJc7m9RAhsDBQkDwmcABQsJCAcCBhUKCQgL
@ageldama
ageldama / podcast-downloader.pl
Created March 15, 2019 18:12
podcast-downloader.pl
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw|say|;
use utf8;
use open ':std', ':encoding(UTF-8)';
use Data::Dumper;
use XML::Tidy;
use XML::LibXML;
@ageldama
ageldama / cl-mock-hello.lisp
Created March 6, 2019 18:36
cl-mock + prove hello
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :cl-mock)
(ql:quickload :prove))
(defpackage cl-mock-hello
(:use :cl :cl-mock :prove)
(:export :run))
(in-package :cl-mock-hello)
@ageldama
ageldama / better-with-shell-split-string.el
Last active February 17, 2019 04:25
extract-incdirs-from-compile-commands-json.el
(require 's)
(require 'dash)
(use-package shell-split-string :ensure t)
(defun extract-inc-dirs (s)
(->> (shell-split-string s)
(--filter (s-starts-with? "-I" it))
(--map (s-chop-prefix "-I" it))))
@ageldama
ageldama / change-layout
Created February 10, 2019 08:40 — forked from ffwff/change-layout
Changes layout of current i3 workspace
#!/bin/bash
if [[ "$1" = "fourbox" ]]; then
(i3-save-tree |sed -e's/^\s*\/\/\s[^\"].*//g' -e's/^\s*\/\///g' | \
jq '..|objects|select(.type=="con")|select(has("nodes")|not)'| \
jq -s '{layout:"splith","type":"con",nodes:[{"layout":"splitv",nodes:[.[0],.[1]]},{"layout":"splitv",nodes:[.[2],.[3]]}]}') > /tmp/layout
else
(i3-save-tree |sed -e's/^\s*\/\/\s[^\"].*//g' -e's/^\s*\/\///g' | \
jq '..|objects|select(.type=="con")|select(has("nodes")|not)'| \
jq -s '{layout:"'$1'","type":"con",nodes:.}') > /tmp/layout