Skip to content

Instantly share code, notes, and snippets.

View OctavioBR's full-sized avatar
⌨️
Working from home

Octávio Richter OctavioBR

⌨️
Working from home
View GitHub Profile
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active April 26, 2024 11:53
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@justo
justo / atom-invisibles-override.less
Created December 9, 2015 20:56
Style to make Atom's tab character a wide line like Sublime Text and to only show invisibles on document highlight.
atom-text-editor::shadow {
/**
* Put this in your Atom stylesheet to replace the tab character with
* a full-width line like in Sublime Text. Change the background color
* to match your theme.
*
* Open your Atom settings and under "Editor Settings" change your
* "Invisbles Tab" field to a single space (" "). Otherwise you will see
* both tab indicators.
*/
@jsomers
jsomers / a-wotd-custom-word-list.md
Last active October 23, 2023 20:20
How to use a custom word list with OS X's "Word of the Day" screensaver

OS X's "Word of the Day" screensaver is a great way to passively learn words:

But I've always thought that its word list kind of stunk—it was full of obscure words that I could never really see myself using. I'd prefer something like Norman Schur's 1000 Most Important Words. What if you could plug your own word list into the screensaver?

On a rather obscure comment thread, someone explained where you might find the word list that Apple uses to power the screensaver. It is at /System/Library/Graphics/Quartz\ Composer\ Plug-Ins/WOTD.plugin/Contents/Resources/NOAD_wotd_list.txt. The file looks like this:

m_en_us1282510	quinsy
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@jwebcat
jwebcat / gist:5122366
Last active March 25, 2024 18:25 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@sockmonk
sockmonk / iterm2.md
Created October 3, 2011 16:44 — forked from chelmertz/iterm2.md
iterm2 cheatsheet
Function Shortcut
previous tab ⌘ + left arrow
next tab ⌘ + right arrow
go to tab ⌘ + number
go to window ⌘ + Option + Number
go to split pane by direction ⌘ + Option + arrow
go to split pane by order of use ⌘ + ] , ⌘ + [
split window horizontally (same profile) ⌘ + D
split window vertically (same profile) ⌘ + d