Skip to content

Instantly share code, notes, and snippets.

View angstbear's full-sized avatar

Kristopher angstbear

View GitHub Profile
@angstbear
angstbear / decrypt.rb
Created November 16, 2021 19:16
AES Decryption logic for implicit IVs
require "openssl"
require "digest"
require "base64"
passphrase = '<key>'
encrypted_data = '<base64 encoded value>'
def derive_key_and_iv(passphrase, salt)
dx = di = ""
enc_pass = passphrase.bytes.pack('c*')

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@angstbear
angstbear / atom-tab-styles.less
Last active December 10, 2020 20:41
Style snippet for customizing tab close icon location in Atom text editor. I'm currently using with the One Light/Dark theme, so left value can be adjusted according to theme.
/* Close tab button location */
.tab-bar .tab .close-icon {
left: 0.5em !important;
right: auto;
}

A Github Org-mode Test

Formatting

bold italic strikethrough underline

Lists

  • list
  • items
@angstbear
angstbear / put_file_on_change.pl
Last active November 18, 2016 23:12
Monitors file for change, and uploads to remote destination when change is detected.
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use File::Monitor;
use Getopt::Long;
__PACKAGE__->new->run;
@angstbear
angstbear / fish_greeting.fish
Last active January 30, 2023 02:48
fortune + cowsay (random animal) + lolcat Fish-Shell prompt greeting
function fish_greeting
if not which fortune > /dev/null ^ /dev/null
switch (uname)
case Darwin
echo Installing fortune and cowsay
brew install fortune
sudo gem install lolcat
case Linux
echo Installing fortune and cowsay
if which apt-get > /dev/null ^ /dev/null
@angstbear
angstbear / atom-emacs-keymap.cson
Last active May 19, 2016 22:48
A small selection of emacs key bindings to help me feel more at home with atom
'atom-workspace':
'alt-x': 'command-palette:toggle'
'ctrl-x 0': 'pane:close'
'ctrl-x 1': 'pane:close-other-items'
'ctrl-x 2': 'pane:split-down'
'ctrl-x 3': 'pane:split-right'
'ctrl-x o': 'window:focus-next-pane'
'ctrl-x h': 'core:select-all'
'ctrl-x k': 'core:close'
'ctrl-x b': 'fuzzy-finder:toggle-buffer-finder'