Skip to content

Instantly share code, notes, and snippets.

View kisom's full-sized avatar

Kyle Isom kisom

View GitHub Profile
@kisom
kisom / db.cc
Created January 30, 2020 15:33
sqlitec++ example
bool
Tag(SQLite::Database &db, kortex::store::Tag tag)
{
if (!Metadata(db, tag.Meta)) {
return false;
}
SQLite::Statement q(db, "INSERT INTO tags (id, name, metadata) VALUES (?, ?, ?)");
q.bind(1, tag.ID());
q.bind(2, tag.Name());
@kisom
kisom / keybase.md
Created August 9, 2018 22:24
keybase.md

Keybase proof

I hereby claim:

  • I am kisom on github.
  • I am kisom (https://keybase.io/kisom) on keybase.
  • I have a public key ASB4v1uzRtIwO-v83dUbp0YXedoSrzLRB7yGb-oYZy5ZGAo

To claim this, I am signing this object:

add 0 515969
remove 0
add 0 736404
add 0 180738
get 0
remove 0
add 0 640651
add 1 912519
remove 2
get 0
This file has been truncated, but you can view the full file.
add 0 202064
add 0 309727
get 0
get 1
set 0 from 309727 to 457321
set 1 from 202064 to 229627
set 0 from 457321 to 350553
get 1
add 1 430738
This file has been truncated, but you can view the full file.
add 0 202064
add 0 309727
get 0
get 1
set 0 from 309727 to 457321
set 1 from 202064 to 229627
set 0 from 457321 to 350553
get 1
add 1 430738
@kisom
kisom / Makefile
Created August 31, 2017 04:09
preflights in Makefiles
.PHONY: envdir
serve: envdir
$(eval ENVDIR := $(shell ./preflight.sh))
$(ENVDIR) /usr/local/myservice/env python -m SimpleHTTPServer 8000
@kisom
kisom / autobuild.sh
Last active January 29, 2016 23:30
Autotools bootstrap script.
#!/bin/sh
# _ _ _ _ _ _
# __ _ _ _| |_ ___ | |__ _ _(_) | __| | ___| |__
# / _` | | | | __/ _ \| '_ \| | | | | |/ _` | / __| '_ \
# | (_| | |_| | || (_) | |_) | |_| | | | (_| |_\__ \ | | |
# \__,_|\__,_|\__\___/|_.__/ \__,_|_|_|\__,_(_)___/_| |_|
#
#
# https://git.io/autobuild
#
@kisom
kisom / output.sh
Last active September 15, 2015 04:21
scanning elvi
~/code/perl
(0) <tessier:kyle> $ perl scan-elvi.pl
w3link doesn't match.
l1sp doesn't match.
w3rdf doesn't match.
w3html doesn't match.
worldwidescience doesn't match.
searx doesn't match.
w3css doesn't match.
f5 doesn't match.
@kisom
kisom / README
Last active September 13, 2015 08:04
cd
Written as a demo of how a shell would implement this, and why it needs
to be a shell builtin.
This won't actually work as a standalone program; chdir(3) only changes
the directory of the current process. As soon as the program exits, it
returns control to the parent process (the shell). If this is executed
as a shell builtin, the shell process's working directory is changed.
@kisom
kisom / README.md
Created August 14, 2015 23:00
Auto fmt / vet / build / test Go code

This is my workflow for automatically building and testing Go code. It uses steeloverseer to watch for changes to the tree and run the standard Go tools (vet, build, test) on the package as well as golint on any changed files.

Install steeloverseer with

cabal install steeloverseer &amp;&amp; cp ~/.cabal/bin/sos ~/bin