Skip to content

Instantly share code, notes, and snippets.

@josh64x2
josh64x2 / pt100reg.py
Created November 5, 2022 05:43 — forked from anonymous/pt100reg.py
PT100Reg - allows you to create a registration key for the PT100 terminal emulator for Newton
maxUnsigned = 0x1FFFFFFF
bitsInUnsigned = int(29)
seventyFivePercent = int(22)
twelvePercent = int(4)
highBits = 0x1E000000
lowBits = 0x01FFFFFF
def generateRegCode(userName):
reg = ""
sn = ""
@josh64x2
josh64x2 / System Design.md
Created November 6, 2018 01:34 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@josh64x2
josh64x2 / userChrome.css
Last active December 13, 2022 03:05
Firefox userChrome.css for showing close button on tabs on hover and left hand side
//@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
//@-moz-document url(chrome://browser/content/browser.xul){
#TabsToolbar #tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
-moz-box-ordinal-group: 0 !important;
-moz-margin-start:-4px !important;
-moz-margin-end:4px !important;
}
.tabbrowser-tab:not(:hover) .tab-close-button{ display:none; }
@josh64x2
josh64x2 / reinstall_gems.md
Last active January 21, 2019 02:30
Reinstall ruby gems
  1. gem list | cut -d" " -f1 > gem_list.txt
  2. cat gem_list.txt | xargs gem install
@josh64x2
josh64x2 / mac-notes.md
Last active May 10, 2024 14:34
mac notes

disable gatekeeper sudo spctl --master-disable

disable verification defaults write com.apple.LaunchServices LSQuarantine -bool NO

reset launchpad defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock

Remove OmniFocus v2 unread news

@josh64x2
josh64x2 / lightdm.conf
Last active March 18, 2016 00:46
XDMCP for lightdm
[XDMCPServer]
enabled=true
[SeatDefaults]
xserver-allow-tcp=true
@josh64x2
josh64x2 / boxsyncfix.txt
Last active March 8, 2021 16:07
Manually enable the Box Sync finder extension for mac
pluginkit -a /Applications/Box\ Sync.app/Contents/Plugins/FinderSyncExt.appex