Skip to content

Instantly share code, notes, and snippets.

View FSX's full-sized avatar
💭
I may be slow to respond.

Frank FSX

💭
I may be slow to respond.
View GitHub Profile
@FSX
FSX / script.lua
Last active December 21, 2023 15:34 — forked from chanks/script.lua
Lua script to delete/trim all processed messages from a Redis stream
-- 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 redis.call("EXISTS", KEYS[1]) == 0 then
return false
end

Keybase proof

I hereby claim:

  • I am fsx on github.
  • I am fsx (https://keybase.io/fsx) on keybase.
  • I have a public key ASAIRr_qNsll5vg1oD-4-wJltY-utn8HXHLv8MM1yU879go

To claim this, I am signing this object:

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',
! special
*.foreground: #c5c8c6
*.background: #0f0d0d
*.cursorColor: #c5c8c6
! black
*.color0: #282a2e
*.color8: #373b41
! red
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
@FSX
FSX / README.md
Last active December 20, 2015 11:39
Simple IRC bot in Go.

Installation

$ 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
FSX / conway.go
Last active December 20, 2015 06:49
Game of life in Go.
// I peeked at http://rosettacode.org/wiki/Conway's_Game_of_Life#Go
package main
import (
"fmt"
"github.com/nsf/termbox-go"
// "math/rand"
"strings"
"time"
)
@FSX
FSX / async_psycopg2_test.py
Created October 5, 2012 11:10
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
@FSX
FSX / about.md
Last active May 10, 2020 08:22 — forked from jasonrudolph/about.md
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].

@FSX
FSX / virtualenv-funcs.sh
Created July 9, 2012 13:54
Some helper functions for Virtualenv.
#!/bin/bash
# Add to ~/.bashrc
# source /path/to/virtualenv-funcs.sh
# Usage: command virtualenv-name python-version
# Examples:
# mkenv momoko 2
# workon momoko 2
# delenv momoko 2