Skip to content

Instantly share code, notes, and snippets.

@keeganjk
keeganjk / .hyper.js
Last active May 9, 2018 02:15
.hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@keeganjk
keeganjk / color-codes
Created March 25, 2018 21:36
Color codes for UNIX systems
black = u'\u001b[30m'
red = u'\u001b[31m'
green = u'\u001b[32m'
yellow = u'\u001b[33m'
blue = u'\u001b[34m'
magenta = u'\u001b[35m'
cyan = u'\u001b[36m'
white = u'\u001b[37m'
normal = u'\u001b[0m'
@keeganjk
keeganjk / config.fish
Last active May 9, 2018 02:18
config.fish for normal user
#~/cow; echo
fortune | cowsay -d; echo
function fish_prompt
set_color normal
echo -n '┌─ '
set_color FFA500
echo -n (whoami)
set_color white
echo -n '@'
@keeganjk
keeganjk / config.fish
Last active May 8, 2018 14:40
Config.fish for root
#~/cow; echo
function fish_prompt
set_color normal
echo -n '┌─ '
set_color brred
echo -n (whoami)
set_color white
echo -n '@'
set_color brblue
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd && notify-send -t 1500 "sxhkdrc reloaded"
# Media keys
XF86AudioPlay
mpc toggle
XF86AudioNext
mpc next
#!/usr/bin/bash
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <[email protected]>
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
let t:is_transparent = 0
function! Toggle_transparent()
if t:is_transparent == 0
hi Normal guibg=NONE ctermbg=NONE
let t:is_transparent = 1
else
set background=dark
let t:is_tranparent = 0
endif
endfunction
@keeganjk
keeganjk / rasm
Last active March 18, 2021 20:28
Re-Audio and Subtitle for MKV files
#!/bin/bash
# Re-Audio/Sub for MKV files
# Run this script from the directory you want to work in
# Dependency: mkvtoolnix-cli
# Audio and subtitle tracks can be checked in a video player like mpv in its audio track selection or in a program like mkvtoolnix-gui
main() {
command="find . -name \"*.mkv\" -exec mkvpropedit {} "$commandAudioPart" "$commandSubtitlePart" \;"
echo "$command"
eval "$command"