Skip to content

Instantly share code, notes, and snippets.

View funnylookinhat's full-sized avatar

David Overcash funnylookinhat

View GitHub Profile
@funnylookinhat
funnylookinhat / f-keys.tmux
Created July 2, 2024 02:05
Byobu Custom Keybindings - Page Up / Page Down
# /usr/share/byobu/keybindings/f-keys.tmux
###############################################################################
# byobu's tmux f-key keybindings
#
# Copyright (C) 2011-2014 Dustin Kirkland <kirkland@byobu.org>
#
# Authors: Dustin Kirkland <kirkland@byobu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@funnylookinhat
funnylookinhat / ctrl_arrow_workspace_bindings.sh
Created July 2, 2024 01:54
Configure Workspaces to be Ctrl + Alt + Arrow
#!/bin/bash
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['<Control><Shift><Alt>Down']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['<Control><Shift><Alt>Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Control><Shift><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Control><Shift><Alt>Right']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Control><Alt>Down']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Control><Alt>Up']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Control><Alt>Left']"
@funnylookinhat
funnylookinhat / gist:1b1979ea9ce7e43431005082f6001374
Created April 7, 2022 12:25
Typescript Flatten Nested Interface
// Source: https://www.typescriptlang.org/play?noErrorTruncation=true&ts=4.4.2#code/HYQwtgpgzgDiDGEAEB5ATgSwOZIN4CgkikNgAXCNAMwWQDEB7BvQ4tqpgLiSjM2Cys2RAEYg0Afm7AArmBGUhw4NAoATbgWHakHBt178sAGiU6kaiBBgAbAJ4A5VRA0tz5sZOlyFaMzoBffyIg8xlgDAZgAz5SHAAfN3ciPRijU2TRcSkkWXlFc1DiIKUyOxh6JjobEDIKFTUkAF4katr6gB5GBgA+JQB6ACokMorWqpq6iAbmpPYuHliBAG5-ACIVXhcAOj01tLjV7XDI6MWjI+E1k6jdpn3zw-9PHLzfJETwyypSF0u2DbONTbSzWexOLbAzxrV4+SgfJBfCA-Br-YjXCK3aGw-JoBFIlF-JQBQb9fBKUgUai0cYMNpTBoAWRAshANjmwlSjwEwSQL28uN5gMhdwYD0McSFm3UIKstkcQO22IFvnJ5n6-RIVERmOAJCgSBA3KwnF5NzOEp5vI1Wp1p31hr1DBEACsIPAyKbzBjTqLxUtBN7zUrxDCVQVimriKNkAA1SgYKh2ADK4GQLUZMjIMjZ9gAogAPepqKBdCbtaYuYy0+n1FzM1k2PolSmUGiIWkcshgNQicN4xJaHRkDBkGwQTS8tgMTBYUhsg48zJILCUMAsnKWwOBXkiGRqVdkHGq8xoCAAN2mMggx4j2jIICwNl+m4DvIYl7Q54wEAA7q+jF5GA0AYNQZA9U4AGEGDAOAImgHIh2SDA1FvPxlxsBgsAYAAFWoAAsAMlZdQEgIil0yGdsFIaDwj4OxyO3bQAgAbQAXV5M9xxAKAIAAEVqG9FyY4RV2AM8oEY9jOLojAyP7ICGC2LxjQRJD3DUWoQE0HhwFsCdHTsJAAiQKdiHgKJ6jIAAVcoDK3XkihCJQ0FqOIdPgfD+2WJA0E9XI4TxEzBxGBgHxsftjKUTSKGTKxgByASKCUKgo
@funnylookinhat
funnylookinhat / docker-compose.yml
Created April 5, 2022 03:22
docker-compose reverse https proxy with traefik using self-signed certificates
# This example demonstrates using Traefik as a quick HTTPS reverse proxy for local
# docker-compose development. It's a common requirement to need to test with SSL
# locally (simulating how load balancers are exposed in production), but most of the
# examples out there require nginx (and a configuration file, and certificates, and
# volumes mapping all of that).
#
# Traefik (and other tools like it: Caddy, Envoy, Istio) make configuration via
# docker labels extremely easy. In this example, we use labels on the "app"
# server to route all traffic from HTTPS (443) to an application exposed on
# port 3000.

Keybase proof

I hereby claim:

  • I am funnylookinhat on github.
  • I am funnylookinhat (https://keybase.io/funnylookinhat) on keybase.
  • I have a public key ASDyW8Os5mUayRbZJ_PhLVfFwq760SRUa8KHINKsjOY0Jwo

To claim this, I am signing this object:

@funnylookinhat
funnylookinhat / test.js
Created March 23, 2016 15:59
Check if you have any of the recently unpublished dependencies.
var fs = require('fs');
var baddies = ['abril-fatface','ada','after-time','alert','andthen','anglicize','ansi-codes','atbash','attr','attrs','available-slug','background-image','ballet','binding','bind-key','blending-modes','boxcars','brick','brick-browser','brick-browserify-plugin','brick-node','browserify-length','bud','bud-babelify','bud-browserify','bud-concat','bud-indexhtml','bud-live-server','call-all','categorize-files','center-box','centered','centered-cover-background','change-object','change-object-path','checkfor','circle','cli-form','cli-qa','combiner','comma-list','comp','concat','config-doc','core-modules','cover-background','create-temp-dir','debounce-fn','declarative-js','default-debug','delegate-dom','dom-children','dom-classes','dom-event','domflow','domquery','dom-select','dom-style','dom-tree','dom-value','door','duba','eksi-server','eksi-sozluk','english-time','environ','every-time','expand-home-dir','failing-code','failing-line','filename-id','filter-stack','findall','first-val','flat-
@funnylookinhat
funnylookinhat / phplint
Created September 25, 2015 22:41
Quick and easy linter for a directory of PHP.
#!/bin/bash
# Add it to your $PATH for extra fun!
for FILE in $(find ./* | grep ".php"); do php -l "$FILE"; done;
@funnylookinhat
funnylookinhat / ssl.conf
Created June 24, 2015 14:38
ssl.conf - Good practice Apache2 SSL config
<IfModule mod_ssl.c>
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
@funnylookinhat
funnylookinhat / quick-grid.css
Created July 8, 2014 15:36
Because sometimes you just need a quick grid that isn't responsive...
.grid-row {
display: block;
box-sizing: border-box;
}
.grid-row, .grid-row:before, .grid-row:after, .grid-row *, .grid-row *:before, .grid-row *:after {
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.grid-row:after {