Skip to content

Instantly share code, notes, and snippets.

View farhaven's full-sized avatar
🦄
I'm a unicorn.

Gregor Best farhaven

🦄
I'm a unicorn.
View GitHub Profile
$ grep rbm /etc/fstab
# nfs der rbm
dijkstra.math.upb.de:/srv/export /rbm nfs defaults,auto 0 0
$ sudo mount /rbm -v
mount.nfs: timeout set for Tue Feb 17 13:54:53 2015
mount.nfs: trying text-based options 'vers=4.2,addr=131.234.115.42,clientaddr=131.234.11.197'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'addr=131.234.115.42'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
package main
import (
"log"
)
func a() []*int {
foo := make([]*int, 10)
for i, v := range foo {
(defmacro let+ [vars &rest body]
(setv cover [])
(setv uncover [])
(for* [v vars]
(if (instance? list v)
(do
(setv name (gensym (first v)))
(.append cover `(try
(setv ~name ~(first v))
(except)))
" Place me into after/plugin/fireplace.vim in your Vim directory. Don't overwrite anything!
augroup fireplace_connect
autocmd FileType hy command! -buffer -bar -nargs=*
\ Connect FireplaceConnect <args>
augroup END
function! s:set_up_eval() abort
command! -buffer -bang -range=0 -nargs=? Eval :exe s:Eval(<bang>0, <line1>, <line2>, <count>, <q-args>)
(import re)
(import [hy.lex [tokenize]])
(defn extract-exprs [src]
(dict-comp
(, (.start x) (.end x))
(-> x
.group
(cut 1 -1)
tokenize)
function foo {
typeset s=$?
if [ $s -ne 0 ]; then
echo -n "$s"
fi
}
PS1='$(foo)'
#include <assert.h>
#include <err.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
# $OpenBSD: login.conf,v 1.6 2015/10/23 22:55:49 sthen Exp $
#
# Sample login.conf file. See login.conf(5) for details.
#
#
# Standard authentication styles:
#
# passwd Use only the local password file
config {
# hostname ftp.hostserver.de
hostname mirror.osn.de
collection {
name openbsd-cvsroot
release rcs
prefix /mnt/media/cvs
umask 002
}
collection {
15:16:41 farhaven | ksh: cd: /usr/ports/net/bitcoin - No such file or directory
15:16:43 farhaven | nah :)
15:17:50 farhaven | it would be awesome if you could do per-file patches instead of a whole tree
15:18:02 farhaven | as in, diff -u file.orig file
15:18:08 farhaven | where file.orig is the one without your changes
15:19:32 farhaven | and from there, you basically kick out all old patches and add yours one by one
15:19:38 farhaven | named patch-$something
15:19:48 farhaven | where $something is a version of the file path
15:20:07 farhaven | so a patch for a/b/c/foo.c gets named patch-a-b-c-foo_c
15:20:24 farhaven | that way, it's obvious to which file a patch applies