Skip to content

Instantly share code, notes, and snippets.

@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
<script src="https://f.convertkit.com/ckjs/ck.5.js"></script>
<form action="https://app.convertkit.com/forms/FORM_ID/subscriptions" method="post" data-sv-form="FORM_ID" data-uid="UID_FROM_FORM_HTML">
<ul data-element="errors"></ul>
<div data-element="fields">
<input name="fields[first_name]" type="text">
<input name="email_address">
<button data-element="submit">Subscribe</button>
</div>
</form>
@hofmannsven
hofmannsven / README.md
Created December 6, 2017 00:32
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

@zcmarine
zcmarine / remap_capslock.lua
Created March 28, 2017 15:35
Hammerspoon capslock remapping: tap to Escape, hold in chord for Control
-- Inspired by https://github.com/jasoncodes/dotfiles/blob/master/hammerspoon/control_escape.lua
-- You'll also have to install Karabiner Elements and map caps_lock to left_control there
len = function(t)
local length = 0
for k, v in pairs(t) do
length = length + 1
end
return length
end
@gomar
gomar / 00-intro.md
Last active January 30, 2024 04:58
Setting up a Keynote document for grid layout design

Setting up a Keynote document for grid layout design

I like (love ?) Keynote because it

  • is a simple to use presentation software,
  • is vector based (when zooming it just looks gorgeous)
  • exports to powerpoint

If I could remove that last argument, I would, but the fact is that, as a consultant, the final document is almost always expected to be a powerpoint document. Don't ask me why, it is just so. I am fighting against it but I did not win the battle so far ...

@arbelt
arbelt / init.lua
Created October 2, 2016 20:55
Hammerspoon config to send escape on short ctrl press
ctrl_table = {
sends_escape = true,
last_mods = {}
}
control_key_timer = hs.timer.delayed.new(0.15, function()
ctrl_table["send_escape"] = false
-- log.i("timer fired")
-- control_key_timer:stop()
end
@Zequez
Zequez / init.coffee
Last active February 26, 2023 15:19
Comment out JSX code on Atom
# If you worked with React and JSX you probably noticed that you can't use JS comments when inside JSX sections
# Add this to your Atom init script
# Then add 'ctrl-cmd-/': 'comment-jsx' to your keymap.cson
# Then when you are on a JS/JSX file, just press cmd+ctrl+/ to use JSX-style comments that work with JSX elements
# Is not the most efficient way, but it's the cleanest and reliable one
atom.commands.add 'atom-workspace', 'comment-jsx', ->
atom.config.set('editor.commentStart', '{/*', {scopeSelector: '.source.js.jsx'})
atom.config.set('editor.commentEnd', '*/}', {scopeSelector: '.source.js.jsx'})
for selection in atom.workspace.getActiveTextEditor().selections
@bradwright
bradwright / private.xml
Last active August 29, 2015 14:00
KeyRemap4MacBook XML configuration for the Tarmak transitional layout
<?xml version="1.0"?>
<root>
<item>
<name>Tarmak transitional layout</name>
<!-- http://forum.colemak.com/viewtopic.php?pid=8786#p8786 -->
<item>
<name>Tarmak1(E) transitional layout (E&gt;K&gt;N&gt;J)</name>
<identifier>private.tarmak.tarmak_1_e</identifier>
<autogen>__KeyToKey__ KeyCode::K, KeyCode::E</autogen>
<autogen>__KeyToKey__ KeyCode::N, KeyCode::K</autogen>