Skip to content

Instantly share code, notes, and snippets.

View nerflad's full-sized avatar
💭
🔵

eric bailey nerflad

💭
🔵
  • nyc
  • 19:25 (UTC -04:00)
View GitHub Profile
function z --wraps=zellij --description 'alias z zellij'
if [ -z "$argv" ]
if zellij list-sessions
zellij attach "$hostname"
else
zellij
end
else
zellij $argv
end
#!/usr/bin/env bash
cat $@ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g"
@nerflad
nerflad / x.fish
Last active August 4, 2025 20:42
function x --wraps=exit --description 'alias x exit'
set -l currentSession (ps aux | grep (zellij list-sessions | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | grep current 2>/dev/null | awk -F' ' '{print $1}') 2>/dev/null | grep -v grep 2>/dev/null | awk -F' ' '{print $2}')
set -l zellijAttach (pgrep -f "zellij attach")
set -l zellijMain (pgrep -f "zellij" | head -n1)
[ -n "$zellijAttach" ] && kill -15 "$zellijAttach" && return 0
#↓ else: haven't detached from session yet
if contains "$currentSession" (pgrep zellij)
kill -15 "$zellijMain"
return 0
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
/ _||||| -:- |||||_ \
| | \\\ - /'| | |
# Maintainer: oliver < a t > first . in-berlin . de
# Contributor: charlesthehawk at yahoo dot com
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
pkgname=ocaml-sqlite3
_pkgname=sqlite3-ocaml
pkgver=4.4.0
pkgrel=2
pkgdesc="SQLite3 bindings for OCaml"
arch=('i686' 'x86_64')
@nerflad
nerflad / PKGBUILD
Created January 20, 2018 09:37
quake3-cpma-maps
# Contributor: Slash <demodevil5[at]yahoo[dot]com>
# Maintainer: Lukas Sabota [prg318] <LTsmooth42[at]gmail[dot]com>
pkgname=quake3-cpma-maps
pkgver=20180120
pkgrel=1
pkgdesc="Challenge ProMode Arena (CPMA) Official Mappack (Can be used in any Quake 3 Mod)."
url="http://playmorepromode.org"
license=('custom')
arch=('any')
@nerflad
nerflad / create-SSL.sh
Created January 17, 2018 11:08
create a self-signed SSL cert
#!/bin/bash
which openssl || echo Missing dependency openssl || exit 1
if ! [[ -d ssl ]]; then
mkdir ssl;
fi
openssl genrsa -out ./ssl/client-key.pem 2048
@nerflad
nerflad / PKGBUILD
Last active November 17, 2017 01:32
ocamlnet 4.1.4 PKGBUILD
# Maintainer: oliver < a t > first . in-berlin . de
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor: Sergei Lebedev <superbobry@gmail.com>
# Contributor: Nicolas Pouillard <Nicolas.Pouillard@gmail.com>
# Contributor: Guillem Rieu <guillemr@gmx.net>
pkgname=ocamlnet
pkgver=4.1.4
pkgrel=1
pkgdesc="A library for Web and Internet programming in OCaml"
arch=('i686' 'x86_64')
#!/bin/sh
DRIVE_PATH=$(mount |grep google-drive-ocamlfuse |awk '{print $3}')
fn_usage () {
echo Usage:
echo $(basename $0) [PATH]
echo
echo If a Google Drive directory is mounted through google-drive-ocamlfuse,
echo unmount it. Otherwise, mount it at PATH.
@nerflad
nerflad / reset.css
Created August 24, 2017 07:18
CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,