Skip to content

Instantly share code, notes, and snippets.

@isomorphisms
isomorphisms / gist:3114ab86960656a729a6b4653001aae2
Created November 27, 2019 06:08
how to pull from docker hub using podman/buildah
On void linux.
Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`.
Change (for me lines 11-12) which say
[registries.search]
registries = []
@isomorphisms
isomorphisms / foo.go
Created October 11, 2019 23:17
how to print out time zones for various places in golang.
package main
import (
"log"
"fmt"
"net/http"
"time"
)
type placeError struct {
@isomorphisms
isomorphisms / tz.go
Created October 11, 2019 23:16
how to print out time zones for various places in golang.
package main
import (
"time"
"fmt"
)
func check(e error) { if( e!= nil) { panic(e) } }
@isomorphisms
isomorphisms / tz.go
Created October 11, 2019 23:12
How to print out the time in golang.
package main
import (
"log"
"fmt"
"net/http"
"time"
)
type placeError struct {
@isomorphisms
isomorphisms / peek.bash
Last active March 9, 2019 08:25
an inspector/peeking function ... alternative to "head"
#print a specific line
li() { sed -n "$1"p ; }
lines() { sed -n "$1,$2"p ; }
#whitespace
ws() { echo -e "\t⋮\t⋮\t⋮" ; } #could also do this once for each column à la (head -1 | tr -dC , | sed "s/,/\t⋮/g")
@isomorphisms
isomorphisms / .bash_aliases
Last active March 9, 2019 02:40
Bash aliases
alias del='gvfs-trash'
alias rm='rm -i'
alias mv='mv -i'
alias ack='ack-grep'
alias g='surfraw google'
alias wk='surfraw wikipedia'
alias def='surfraw google define:'
alias u='surfraw google unicode'
alias n='w3m http://ncatlab.org/nlab/search?query='
alias pdfcat='pdftotext'
@isomorphisms
isomorphisms / annoying.filter
Last active March 4, 2019 01:15
start mutt without having to see bad messages
<limit>
!(
~s token ||
~s reward ||
~s data ||
~s feedback ||
~s news ||
~s free ||
~s crunchbase ||
~s "!!" ||
@isomorphisms
isomorphisms / wegert.R
Last active February 1, 2019 14:26
make complex-plane Wegert plots (plot only the argument, knowing that the length=modulus works the same as in a "regular" Cartesian plot)
#run convenience functions first....
plat <- function(space,FUN,cex=2,chroma=45,a=66,b=4,c=3){ #a,b,c are tuning parameters
func=FUN(space) #eval for speedup
coleur=arg(func)%%360
light=a+b*mod(func)+c*l(coleur)
plot(space, pch=46,cex=cex, col=hcl( h=coleur, c=chroma, l=light ) )
}
#what this function does, is plot a boring series of points with nothing on them,
# moving the REAL ACTION to the colour parameter.
# You're meant to read through this
# configuraton file rather than simply
# copying it to your home directory.
#
# There are some places where you're
# meant to uncomment something if you
# want to use it in your TMUX.
#
# I hope it's readable.
#
"=============================================================================
" What Is This: Prettify .Rmd and .R scripts in vim
" Who made it?: Vincent Barbroux
" https://github.com/Twinside/vim-haskellConceal/blob/master/after/syntax/haskell.vim
" ideas imported also from: https://alok.github.io/2018/04/26/using-vim-s-conceal-to-make-languages-more-tolerable/
" Who adapted it? isomorphisms@sdf.org
" Last change: 10 Oct 2018
" Require:
" set nocompatible
" somewhere on your .vimrc