Skip to content

Instantly share code, notes, and snippets.

View russleyshaw's full-sized avatar
💭
Converting people to the TypeScript hivemind.

Russley Shaw russleyshaw

💭
Converting people to the TypeScript hivemind.
View GitHub Profile
@russleyshaw
russleyshaw / dracula.reg
Last active January 17, 2022 16:45
Dracula Theme registry file for KiTTY
Windows Registry Editor Version 5.00
; README
; Open REGEDIT on Windows and find the exact name of the session you wish to apply the colors to.
; Then replace "YOUR_SESSION_HERE" with the name you found.
[HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions\YOUR_SESSION_HERE]
"Colour21"="255,255,255"
"Colour20"="248,248,242"
"Colour19"="154,237,254"
wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@russleyshaw
russleyshaw / .vimrc
Created December 8, 2017 15:58
.vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'itchyny/lightline.vim'
@russleyshaw
russleyshaw / GenericClassConstructor.ts
Last active September 15, 2017 21:49
Allow generic extended construction.
interface FooConstructor<T> {
new(val: number): T;
}
interface FooInterface {
myVal: number;
}
class Foo implements FooInterface {
myVal: number;
@russleyshaw
russleyshaw / to_ul.hpp
Created April 4, 2017 04:03
Converts class enum to underlying type.
#ifndef RUS_TO_UL_HPP
#define RUS_TO_UL_HPP
#include <type_traits>
/**
* Convert a class enumeration to its underlying type.
* Got tired of writing out static_casts and std::underlying type
* @param enumeration
* @return Value of enumeration
@russleyshaw
russleyshaw / viewbb.py
Created March 2, 2017 08:06
Given a 64 bit integer, print out the corresponding bit chess board using Little-Endian Rank-File Mapping
# Russley Shaw 2017
# Given a 64 bit integer,
# print out the corresponding bit chess board
# using Little-Endian Rank-File Mapping
# Usage: python3 viewbb.py 0x<hex>
# Usage: python3 viewbb.py <int>
# Example: python3 viewbb.py 0x8080808080808080
@russleyshaw
russleyshaw / dancing_text_md.py
Created January 23, 2017 18:26
Convert text into dancing gifs in markdown
gifMap = {
'a': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-a-50-transa.gif',
'b': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-b-50-transa.gif',
'c': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-c-50-transa.gif',
'd': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-d-50-transa.gif',
'e': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-e-50-transa.gif',
'f': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-f-50-transa.gif',
'g': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-g-50-transa.gif',
'h': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-h-50-transa.gif',
'i': 'http://toons.artie.com/alphabet/ralph/color_cycling/arg-i-50-transa.gif',
//Macro for simple base and inherited exception creation
#ifndef _EASY_EXCEPTION_H
#define _EASY_EXCEPTION_H
#include <exception>
#define EASY_EXCEPTION(NAME, WHAT) \
class NAME: public std::exception { \
public: \
@russleyshaw
russleyshaw / rotator.py
Created March 14, 2015 03:29
Python Fu GIMP Hue Rotator
images = gimp.image_list()
image = images[0]
layers = image.layers
layer = image.layers[0]
steps = 60
OFFSET = 360/steps
ALL_HUES = 0
for i in xrange(steps):
pdb.gimp_hue_saturation(layer, ALL_HUES, OFFSET, 0, 0)
filename = 'hue_rotator/{}.jpeg'.format(i)