Skip to content

Instantly share code, notes, and snippets.

Robin Skahjem-Eriksen ironhouzi

  • Norway
Block or report user

Report or block ironhouzi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View neovim-stacktrace.txt
(gdb) thread apply all bt full
Thread 2 (Thread 0x7fb4cafe2700 (LWP 25679)):
#0 0x00007fb4ce679585 in free () from /usr/lib/libjemalloc.so.2
No symbol table info available.
#1 0x0000561d76e7bfa7 in xfree (ptr=ptr@entry=0x7fb4c9a97120) at /tmp/yaourt-tmp-ironhouzi/aur-neovim-git/src/neovim-git/src/nvim/memory.c:133
No locals.
#2 0x0000561d76e02917 in multiqueue_remove (this=this@entry=0x7fb4ca203060) at /tmp/yaourt-tmp-ironhouzi/aur-neovim-git/src/neovim-git/src/nvim/event/multiqueue.c:222
__PRETTY_FUNCTION__ = "multiqueue_remove"
h = <optimized out>
View stacktrace.txt
Stack trace of thread 25676:
#0 0x0000561d76ec9ba6 bt_nofile (nvim)
#1 0x0000561d76e3c7cd shorten_fnames (nvim)
#2 0x0000561d76da3804 do_autochdir (nvim)
#3 0x0000561d76f620b9 win_enter_ext (nvim)
#4 0x0000561d76f65616 win_close (nvim)
#5 0x0000561d76e1f7db ex_quit (nvim)
#6 0x0000561d76e23a9b do_one_cmd (nvim)
#7 0x0000561d76e245a7 do_cmdline (nvim)
View parser.hs
type Parser a = String -> [(a, String)]
result :: a -> Parser a
result v = \inp -> [(v, inp)]
zero :: a -> Parser a
zero v = \inp -> []
item :: Parser Char
item =
View prefixtree.hs
alpha = ["K", "Kh", "G", "Ng", "C", "Ch", "J", "Ny", "T", "Th", "D", "N", "P", "Ph", "B", "M", "Ts", "Tsh", "Dz", "W", "Zh", "Z", "'", "Y", "R", "L", "Sh", "S", "H", "A", "I", "U", "E", "O"]
data Ptree a = Pnode a [Ptree a] deriving (Eq, Show)
ptAdd :: String -> Ptree Char
ptAdd (c:cs)
| cs == [] = Pnode c []
| otherwise = Pnode c [ptAdd cs]
ptInsert :: String -> [Ptree Char] -> [Ptree Char]
View prefixtree.hs
data Ptree a = Pnode a [Ptree a] deriving (Eq, Show)
ptLeaf :: Char -> Ptree Char
ptLeaf c = Pnode c []
ptInsert :: String -> Ptree Char -> Ptree Char
ptInsert [] tree = tree
ptInsert (c:cs) (Pnode v children) = case children of
[] -> ptInsert cs (Pnode v ((ptLeaf c) : children))
(h:t) | h == (ptLeaf c) -> ptInsert cs h
View prefixtree.hs
data Ptree a = Pnode a [Ptree a] deriving (Eq, Show)
ptLeaf :: Char -> Ptree Char
ptLeaf c = Pnode c []
ptInsert :: String -> Ptree Char -> Ptree Char
ptInsert (c:cs) (Pnode v children)
| cs == [] = ptAdd (ptLeaf c) (Pnode v children)
| ptLeaf c `elem` children = ptInsert cs (filter (\n -> n == (ptLeaf c)) children)
| otherwise = Pnode v ((ptLeaf c) : children)
View neomuttrc_fastmail
set imap_user="user@fastmail.com"
set imap_pass=`gpass.sh mutt_fastmail`
set folder=imaps://imap.fastmail.com/
set spoolfile=+INBOX
# Gmail SMTP auto saves sent mails - no need to set
set record=""
set postponed="+Drafts"
# Archive read mails
set mbox="imaps://imap.fastmail.com/Archive"
View tib.hs
import Data.Char
data Letter = Ka
| Kha
| Ga
| Nga
| Ca
| Cha
| Ja
| Nya
View gist:f65f58e32836254bcb3ad3271d35e4f0
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 4850 0.0 0.0 81464 5552 pts/2 T 10:39 0:00 | \_ sudo udevmon -c /etc/udev/udevmon_ctrl.yaml
root 5067 0.0 0.0 81740 5548 pts/2 S 10:40 0:00 | \_ sudo udevmon -c /etc/udev/udevmon_ctrl.yaml
root 5077 0.0 0.0 22892 4440 pts/2 S 10:40 0:00 | | \_ udevmon -c /etc/udev/udevmon_ctrl.yaml
root 5107 0.0 0.0 14188 2696 pts/2 S 10:40 0:00 | | \_ sh -c intercept -g $DEVNODE | ctrl2esc | uinput -d $DEVNODE
root 5108 0.0 0.0 9812 1080 pts/2 S 10:40 0:00 | | | \_ intercept -g /dev/input/event20
root 5109 0.0 0.0 4140 684 pts/2 S 10:40 0:01 | | | \_ ctrl2esc
root 5110 0.0 0.0 18328 3672 pts/2 S 10:40 0:01 | | | \_ uinput -d /dev/input/event20
root 5117 0.0 0.0 14188 2848 pts/2 S 10:40 0:00 | | \_ sh -c intercept -g $DEVNODE | ctrl2esc | uinput -d $D
View gist:0c6caa0d4ec42b6e8cea84de89ec0ef3
In [41]: lon[250][145]
Out[41]: 34.34894069196243
In [42]: mlon = np.full(lon.shape, lon[250][145], dtype=np.float64)
In [43]: lat[250][145]
Out[43]: 49.475985060839555
In [44]: mlat = np.full(lat.shape, lat[250][145], dtype=np.float64)
You can’t perform that action at this time.