Skip to content

Instantly share code, notes, and snippets.

View marty-Wallace's full-sized avatar
:shipit:
Syncing...

Martin Wallace marty-Wallace

:shipit:
Syncing...
  • Lake Country, BC. Canada
  • 02:26 (UTC -08:00)
View GitHub Profile
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main]
"SendIntranetTraffictoInternetExplorer"=hex:00
@marty-Wallace
marty-Wallace / disableCapsLock.reg
Created September 11, 2019 16:41
Disables caps lock in windows.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00
@marty-Wallace
marty-Wallace / to_gif.sh
Created February 14, 2018 21:09
Encode a .ogv to a .gif. Requires ffmpeg
#!/bin/bash
inputFile=$1
FPS=15
WIDTH=1200
#Generate palette for better quality
ffmpeg -i $inputFile -vf fps=$FPS,scale=$WIDTH:-1:flags=lanczos,palettegen tmp_palette.png
#Generate gif using palette
@marty-Wallace
marty-Wallace / .ideavimrc
Last active August 7, 2024 19:50
Bare bones vimrc to make IdeaVim stop beeping + a few other essentials
""README
"" This file should be called .ideavimrc on a linux/unix system or _ideavimrc on a windows system.
"" You will need to restart intellij once the file is added.
" Makes moving the cursor function as expected with wrapped lines
noremap j gj
noremap k gk
" This will keep the cursor at least 15 lines away from the top or bottom of the editor window
set scrolloff=15
@marty-Wallace
marty-Wallace / progress_bar.py
Last active March 16, 2017 06:06
python progress bar for terminals
import sys
def drawProgressBar(percent_done, barLength = 40):
"""Display an updating progress bar in a terminal
:percent_done: the percent done to display
:barLength: how many chars long the bar is
:returns: None
@marty-Wallace
marty-Wallace / copy_paste.bash.alias
Created March 15, 2017 17:10
bash aliases for copy and paste with Xclip
#copies the piped input onto the clipboard
alias copy="xclip -selection c"
#pastes the clipboards contents into the terminal
alias paste="xclip -selection clipboard -o"
@marty-Wallace
marty-Wallace / Sierpinsky.py
Created March 14, 2017 19:27
Draw a sierpinsky triangle with Turtle graphics
import math
from turtle import *
size = 800
minimum = 8
pythagoras = math.sqrt(3) / 2
def s(l, x, y):
if l>minimum:
@marty-Wallace
marty-Wallace / BtcPrices.sh
Created March 10, 2017 00:49
Check the current market price of Bitcoin in USD and CAD and print it out
echo -n 'Current price of bitcoin in ' ; curl -s https://blockchain.info/ticker | grep USD | tr -s ' ' | tr -d '"' | tr -d ' ' | cut -d ':' -f 1,3 | cut -d ',' -f 1
echo -n 'Current price of bitcoin in ' ; curl -s https://blockchain.info/ticker | grep CAD | tr -s ' ' | tr -d '"' | tr -d ' ' | cut -d ':' -f 1,3 | cut -d ',' -f 1
@marty-Wallace
marty-Wallace / reverseScrolling.sh
Last active December 28, 2016 21:01
Reverses Scrolling for Linux system
echo "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap