Skip to content

Instantly share code, notes, and snippets.

@dantheman213
dantheman213 / Xbox Controller (GCPad).ini
Last active June 18, 2024 13:19
Dolphin Gamecube/Wii emulator / Xbox One Controller profile
# Dolphin Gamecube/Wii emulator / Xbox One Controller profile
# Gamecube Controller
# Location -> C:\User\<your user>\Documents\Dolphin Emulator\Config\Profiles\GCPad\Xbox Controller (GCPad).ini
[Profile]
Device = XInput/0/Gamepad
Buttons/A = `Button A`
Buttons/B = `Button B`
Buttons/X = `Button X`
Buttons/Y = `Button Y`
@kevinelliott
kevinelliott / 1-macOS-10.12-sierra-setup.md
Last active February 5, 2024 07:22
macOS 10.12 Sierra Setup

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@localshred
localshred / nice_hash_comparison_test.rb
Last active November 22, 2023 13:27
Minitest assert_equal sucks for comparing output diffs of two hashes. Using HashDiff, awesome_print, and StringIO we can get actual comparable hashes without pulling our hair out.
require "test_helper"
require "awesome_print"
require "hashdiff"
class MyClass
def self.do_stuff
{a:[{y:3}, {x:11, z:33}], b:{y:22}}
end
end
@ctechols
ctechols / compinit.zsh
Last active July 12, 2024 18:35
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@LazerPanther
LazerPanther / iterm2_settings.md
Last active January 27, 2021 23:22
Semantic history command for iTerm2 and Neovim. Allows iTerm integration of Command+Click to open a file in default app (if non-text), or Neovim with optional line number and column. Detects relative paths based on PWD.

Semantic history command for iTerm2 and Neovim.

In iTerm's Preferences &gt; Profiles &gt; Default &gt; Advanced &gt; Semantic History, choose Run command... and enter /your/path/to/iterm_open_with \5 \1 \2.

@jeremywrowe
jeremywrowe / .projections.json
Last active August 20, 2017 19:10 — forked from chantastic/.projections.json
ember-cli VIM projections
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"import ApplicationAdapter from './application';",
"",
"export default ApplicationAdapter.extend({",
"",
"});"
],
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active April 24, 2024 18:56
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@jeremiahmarks
jeremiahmarks / servicesandmethods.txt
Created June 18, 2015 08:25
Infustionsoft API list of services and methods
AffiliateProgramService getAffiliatesByProgram
AffiliateProgramService getProgramsForAffiliate
AffiliateProgramService getResourcesForAffiliateProgram
AffiliateService getRedirectLinksForAffiliate
APIAffiliateService affClawbacks
APIAffiliateService affCommissions
APIAffiliateService affPayouts
APIAffiliateService affRunningTotals
@buren
buren / rails_web_console_param.rb
Last active February 13, 2016 18:16
Attach a rails web console to any page by adding ?web_console=
# config/initializers/web_console.rb
WebConsoleBeforeAction = ->(controller) do
controller.console if controller.params[:web_console]
end
ApplicationController.before_action(WebConsoleBeforeAction) if defined?(WebConsole) && Rails.env.development?
# NOTE:
# For security reasons only do this in development.