Skip to content

Instantly share code, notes, and snippets.

View pauldub's full-sized avatar
🐱
🇫🇷 🇧🇪

Paul pauldub

🐱
🇫🇷 🇧🇪
View GitHub Profile
@pauldub
pauldub / i3-powerline.patch
Last active September 3, 2020 07:40 — forked from GladOSkar/i3-powerline.patch
Patch to make powerline separators span the full height in the i3bar - Very hacky, use at own risk! - Designed for use with greshake/i3status-rust - Only tested on 1080p wo/ scaling
diff --git a/libi3/font.c b/libi3/font.c
index 9433467c..3659f4da 100644
--- a/libi3/font.c
+++ b/libi3/font.c
@@ -87,10 +87,12 @@ static bool load_pango_font(i3Font *font, const char *desc) {
static void draw_text_pango(const char *text, size_t text_len,
xcb_drawable_t drawable, xcb_visualtype_t *visual, int x, int y,
int max_width, bool pango_markup) {
+ bool separator = (text[0] == ""[0]) || (text[0] == "🭅"[0]);
/* Create the Pango layout */
@pauldub
pauldub / .janetsh.rc
Created May 24, 2019 07:32
janet zsh-like prompt
# Add ~/.janet to module/paths
(let [base-dir (string (os/getenv "HOME") "/.janet")]
(array/insert module/paths 0
(tuple (string base-dir "/:all:/:name:.:native:") :native))
(array/insert module/paths 0
(tuple (string base-dir "/:all:.:native:") :native))
(array/insert module/paths 0
(tuple (string base-dir "/:all:/init.janet") :source))
(array/insert module/paths 0
(tuple (string base-dir "/:all:.janet") :source))
@pauldub
pauldub / exemple.md
Last active September 21, 2016 08:12
Reference markdown

Normal italique gras code

  • point une
  • point deux
  • point trois
  1. point une
  2. point deux
  3. point trois
@pauldub
pauldub / example.go
Created April 15, 2016 07:48
micro-particle-broker
package main
import (
"log"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/cmd"
"broker/particle"
)
def -allow-override -params 1 godoc %{
%sh{
output=$(mktemp -d -t kak-temp-XXXXXXXX)/fifo
mkfifo ${output}
(go doc $1 > ${output}) > /dev/null 2>&1 < /dev/null &
echo "eval -client %opt{docsclient} echo '
edit! -fifo ${output} *godoc*
hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output})}}
'"
}
@pauldub
pauldub / morgue.txt
Created August 14, 2015 19:16
koakr
Dungeon Crawl Stone Soup version 0.16.1 (tiles) character file.
2076446 koakr the Intangible (level 27, 186/267 (273) HPs)
Began as a Minotaur Gladiator on Aug 14, 2015.
Was the Champion of Cheibriados.
Escaped with the Orb
... and 4 runes!
The game lasted 05:27:58 (105435 turns).
@pauldub
pauldub / gist:e75744db069f56a5e431
Created January 10, 2015 20:39
boar the Hoplite (Demonspawn Wizard)
Dungeon Crawl Stone Soup version 0.15.0-8-gb109cf8 (tiles) character file.
boar the Hoplite (Demonspawn Wizard) Turns: 41031, Time: 03:56:44
HP 137/140 AC 26 Str 11 (13) XL: 17 Next: 49%
MP 31/31 EV 16 Int 23 God: Ashenzari [******]
Gold 1088 SH 22 Dex 15 (16) Spells: 10 memorised, 4 levels left
rFire . . . SeeInvis + a - +12 spear "Cileal" {pierce, +Fly rPois}
rCold + . . Clarity + p - +2 ring mail {rC+} (curse)
@pauldub
pauldub / eden.md
Last active August 29, 2015 14:10
Simple Factor spider

Private API

Returns a season's url on the Audiodramax blog.

: season-url ( season -- url ) 
    "http://www.audiodramax.com/tag/eden-saison-%d" sprintf ;

Filters episodes from a list of urls. At the moment we are only interested on .mp3 files.

USING: accessors arrays byte-arrays calendar fry google.search
io io.directories io.directories.hierarchy io.directories.search
io.encodings.utf8 io.files io.launcher io.pathnames io.pipes
io.timeouts kernel locals make namespaces sequences splitting
strings unicode.categories webbrowser wordtimer ;
IN: spotlight
! *** MAC OS X 10.6.8 & LATER: IMPLEMENTING mdfind, mdls, mdutil, mdimport ***
! *** SEARCHING ON OS X VIA SPOTLIGHT METADATA INDEX, & MANAGING INDEXING FROM FACTOR ***
# Set Ctrl+A as escape sequence
set -g prefix C-a
unbind C-b
# For nested tmuxes use Ctrl+A A <command>
bind a send-prefix
# Lower escape time, make tmux more responsive
set -g escape-time 0