Skip to content

Instantly share code, notes, and snippets.

View yurrriq's full-sized avatar
🙈
I may be slow to respond.

Eric Bailey yurrriq

🙈
I may be slow to respond.
View GitHub Profile
@shihanng
shihanng / .chunkwmrc
Last active January 6, 2024 04:17
chunkwm + skhd
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
@ChrisPenner
ChrisPenner / TicTacToe.hs
Last active August 26, 2017 18:18
Type-safe game of TicTacToe
{-# language DeriveFunctor #-}
{-# language DataKinds #-}
{-# language GADTs #-}
{-# language ViewPatterns #-}
{-# language TypeFamilies #-}
module Prog where
import Data.Function ((&))
-- | Either X, O, or Nothing
@erszcz
erszcz / docs-chunk-design.md
Last active June 24, 2017 01:29
Docs chunk design

Docs chunk format proposal

Let's first look at some elixir_docs_v1 examples (Erlang syntax). The general chunk structure (from GenServer) is:

{elixir_docs_v1,
    [{docs,
         [{{'__using__',1},539,defmacro,[{'',[],'Elixir'}],false},
          {{abcast,3},
@Nikita240
Nikita240 / subtrees.sh
Created June 7, 2017 08:12
Convert git submodules to git subtrees
#!/bin/bash -x
# This script will convert all your git submodules into git subtrees.
# This script ensures that your new subtrees point to the same commits as the
# old submodules did, unlike most other scripts that do this.
# THIS SCRIPT MUST BE PLACED OUTSIDE OF YOUR REPOSITORY!!!!!!!!!!
# Otherwise, the script will interfere with the git commits (unless you add it to .gitignore).
# Save the script in your home directory as `~/subtrees.sh`
# `cd` into your repository
# Run `~/subtrees.sh`
# Enjoy!
@xueshanf
xueshanf / extract_kubecfg_cert.sh
Last active February 13, 2023 13:45
Extract kubernetes cluster credentials from kubecfg
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes
@rosghub
rosghub / dotfiles
Created May 20, 2017 01:12
Manjaro i3 Hi-DPI config
#
# Configuration files for Manjaro i3 on Lenovo Yoga 2 pro
# to scale properly on HiDPI (3200x1800)
#
#####################################################
~/.profile #
#####################################################
# UI element scaling, icons
export GDK_SCALE=2
@mrkgnao
mrkgnao / IosevkaConfigGen.hs
Last active November 8, 2022 18:28
Render Iosevka ligatures to Private Use Area glyphs, for Emacs
{-# LANGUAGE RecordWildCards, Arrows #-}
import Numeric
import Data.Char
import Control.Monad
import Data.Monoid ((<>))
import Data.List (nub, sort, reverse)
data RepeatBounds = RB
@domenkozar
domenkozar / nixos-on-dell-9560.org
Last active August 25, 2023 17:07 — forked from grahamc/nixos-on-dell-9560.org
NixOS on a Dell 15" 9560 with the 4K screen.
@ashgillman
ashgillman / openconnect_wrapper
Created February 16, 2017 12:04
openconnect launchd
#!/bin/bash
# /etc/openconnect_wrapper
# swap out SIGTERM for openconnect-friendly SIGINT
_term() {
kill -INT "$child" 2>/dev/null
}
trap _term SIGTERM
@meanevo
meanevo / haproxy.cfg
Last active May 24, 2023 15:43
HAProxy without SSL Termination
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 2048
user haproxy