Skip to content

Instantly share code, notes, and snippets.

View zachwood's full-sized avatar
💭
🍕

Zachary Wood zachwood

💭
🍕
View GitHub Profile
@gekart
gekart / mnlgxd.py
Last active March 2, 2023 06:27
KORG minilogue xd PROG file parser and pretty printer
# Use this file to parse the structure of your minilogue programs and libraries (sound banks)
# this makes it easy to understand and document a finished sound
# run "python mnlgxd.py test.mnlgxdprog" to print the sound in a program name test.mnlgxdprog
# or "python mnlgxd.py test.mnlgxdlib 1" to print the second sound in the bank named test.mnlgxdlib
import struct, sys, zipfile, fpdf
fileStructure = [
("MAGIC", "<4s"),
("PROGRAM NAME", "12s"),
@RichardForrester
RichardForrester / init.lua
Last active September 26, 2018 01:06
Karabiner Elements and Hammerspoon on MacOS Sierra
-- ln -s ~/repos/config/init.lua ~/.hammerspoon/init.lua
-- Global variable for the Command Mode
cMode = hs.hotkey.modal.new({}, "F17")
-- Global variable for Delete Mode
dMode = hs.hotkey.modal.new({}, 'F20')
-- Global variable for Select Mode
sMode = hs.hotkey.modal.new({}, 'F19')
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@robzienert
robzienert / .gitconfig
Last active May 4, 2021 16:32
git stuffs
[color]
ui = true
[core]
excludesfile = ~/.gitignore
[alias]
cp = cherry-pick
cl = clone
ci = commit
cia = commit --all --amend
co = checkout
@impressiver
impressiver / raven-config.html
Last active February 27, 2024 14:27
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',
@vojtajina
vojtajina / all-templates.html
Created August 15, 2012 00:00
AngularJS: load all templates in one file
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@blaix
blaix / snow_leopard_terminal_colors.markdown
Created July 23, 2010 14:30
Pretty Terminal colors in OS X 10.6 Snow Leopard

For pretty, readable, light-on-dark colors in Terminal.app:

After reading a handful of blog posts I finally got this working in 10.6...

  1. Add this to ~/.bash_profile:

     export CLICOLOR=1
    
  2. Install SIMBL.