Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Frank FSX

I may be slow to respond.
View GitHub Profile
FSX / script.lua
Last active Nov 3, 2021 — forked from chanks/script.lua
Lua script to delete/trim all processed messages from a Redis stream
View script.lua
-- The goal of this script is to trim messages that have been processed by
-- all extant groups from the a given Redis stream. It returns the number
-- of messages that were deleted from the stream, if any. I make no
-- guarantees about its performance, particularly if the stream is large
-- and not fully processed (so a simple XTRIM isn't possible).
-- First off, bail out early if the stream doesn't exist.
if"EXISTS", KEYS[1]) == 0 then
return false

Keybase proof

I hereby claim:

  • I am fsx on github.
  • I am fsx ( on keybase.
  • I have a public key ASAIRr_qNsll5vg1oD-4-wJltY-utn8HXHLv8MM1yU879go

To claim this, I am signing this object:

View howl-init.lua
howl.config.indent = 4
howl.mode.by_name('python').config.indent = 4
howl.mode.by_name('golang').config.tab_indents = true
howl.bindings.push {
editor = {
ctrl_a = 'cursor-home',
ctrl_e = 'cursor-line-end',
ctrl_shift_a = 'cursor-home-extend',
ctrl_shift_e = 'cursor-line-end-extend',
View Xresources
! special
*.foreground: #c5c8c6
*.background: #0f0d0d
*.cursorColor: #c5c8c6
! black
*.color0: #282a2e
*.color8: #373b41
! red
View vimb-config
set defaultencoding=utf-8
set accelerated-compositing=true
set input-autohide=true
set spell-checking=false
set statusbar=true
set webinspector=trueset
set dns-prefetching=true
set insecure-content-show=true
set insecure-content-run=true
set html5-database=true
Last active Dec 20, 2015
Simple IRC bot in Go.


$ mkdir Go && cd Go
$ mkdir -p {bin,pkg,src,src/pikabot,src/pikachu}
# Put content of pikachu.go in src/pikachu
# Put content of pikabot.go in src/pikabot and edit pikabot.go
$ go install pikabot
$ ./bin/pikabot
FSX / conway.go
Last active Dec 20, 2015
Game of life in Go.
View conway.go
// I peeked at's_Game_of_Life#Go
package main
import (
// "math/rand"
Created Oct 5, 2012
Testing asynchronous Psycopg2.
import sys
from functools import partial
import psycopg2
from psycopg2 import OperationalError
from psycopg2.extensions import (POLL_OK, POLL_READ, POLL_WRITE, POLL_ERROR,
connection as base_connection, cursor as base_cursor)
from tornado.ioloop import IOLoop
Last active May 10, 2020 — forked from jasonrudolph/
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

*This gist is a fork of the gist from [this blog post][1] and this [Gist][2].

Created Jul 9, 2012
Some helper functions for Virtualenv.
# Add to ~/.bashrc
# source /path/to/
# Usage: command virtualenv-name python-version
# Examples:
# mkenv momoko 2
# workon momoko 2
# delenv momoko 2