Skip to content

Instantly share code, notes, and snippets.

View eugene-eeo's full-sized avatar
🍵
 

Eeo Jun eugene-eeo

🍵
 
View GitHub Profile
@eugene-eeo
eugene-eeo / readme.md
Last active May 2, 2019 18:39
Floating Layer support for HLWM

Herbsluftwm does not natively come with support for a 'proper' floating layer. We can remedy that problem using some scripting; the goal is to get a 'seamless' experience.

First you need to download and run the floatmon script somewhere in autostart. Using this is a good start. But if you use multiple monitors you will run into the issue where if you focus right, sometimes you can focus an empty floatmon monitor. So probably you want to disable the focus_crosses_monitor_boundaries option.

@eugene-eeo
eugene-eeo / starflake.md
Last active April 25, 2019 23:04
*-flake

*-flake

most distributed uid generation schemes are inspired by twitter's snowflake. basic principle is that we generate ids that can be split into 3 chunks, TSM where:

  • T = time difference
  • S = server 'id'
  • M = server counter, in case we get the same T

ideas

@eugene-eeo
eugene-eeo / st-launch.sh
Last active November 2, 2020 13:33
lightweight rofi alternative
#!/bin/bash
GEOMETRY="80x20+570+300"
_st_fzf() {
fzf +m --tiebreak=length,end --layout=reverse --color=prompt:7,pointer:7,spinner:2,info:8,hl:2,hl+:2,marker:0 --margin=1,2 --prompt='∴ ' $@
}
_st_run() {
st -t 'st-launch' -a -g $GEOMETRY -e "$0" "$1" &
}
SELECT
r.id as r_id,
i.id as i_id,
SUM(u.quantity) as per_resident_total
FROM
resident as r,
inventory_item as i,
inventory_usage as u
WHERE
resident.id = inventory_usage.id AND
SELECT
r.id as r_id,
i.id as i_id,
SUM(u.quantity) as per_resident_total
FROM
resident as r,
inventory_item as i,
inventory_usage as u
WHERE
resident.id = inventory_usage.id AND
Keyboard Layout for the FILCO 68-key UK layout.
Usage:
- Download filco68.keylayout
- Put it in ' ~/Library/Keyboard Layouts'
- Add layout to input sources => done
@eugene-eeo
eugene-eeo / editor.py
Last active November 15, 2016 10:25
editor.py prototype
#!/usr/bin/env python
"""Tools for invoking editors programmatically."""
from __future__ import print_function
import sys
import locale
import os.path
import subprocess
import tempfile
@eugene-eeo
eugene-eeo / t.js
Last active August 9, 2016 04:49
micro templating
/*
* lo and behold, in all its glory:
*/
var t = (s,d) => s.replace(/{(.+?)}/, (_,k) => k.split('.').reduce((o,g) => o[g], d))
t('{name}', {name: 'me'})
// => 'me'
t('@{user.name}', {user: {name: 'me'}})
// => '@me'
t('{0}', [1])
@eugene-eeo
eugene-eeo / keybase.md
Created July 30, 2016 02:59
keybase.md

Keybase proof

I hereby claim:

  • I am eugene-eeo on github.
  • I am eeojun (https://keybase.io/eeojun) on keybase.
  • I have a public key ASBPozL3c19DFS2saFNdiQbq_O3si2lcJRrnBGfbAFPgHQo

To claim this, I am signing this object:

@eugene-eeo
eugene-eeo / LICENSE.txt
Created December 28, 2015 03:06 — forked from jed/LICENSE.txt
calculate # of ms/seconds/minutes/hours/days in the past
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE