Skip to content

Instantly share code, notes, and snippets.

View idanci's full-sized avatar
🏠
Working from home

Ivan Danci idanci

🏠
Working from home
View GitHub Profile
#!/bin/sh
# Replaces tilda with left shift (literally making left shift button "longer")
# Replaces paragraph with tilda (so your tilda is in top left corner under escape now)
hidutil property --set '{"UserKeyMapping":[
{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x7000000E1},
{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}
]}'
@idanci
idanci / Solution.rb
Last active January 13, 2020 21:40
Foregone Solution
# https://codingcompetitions.withgoogle.com/codejam/round/0000000000051705/0000000000088231
def split(amount)
res, char_amount = [0, 0], amount.to_s
0.upto(char_amount.length - 1) do |i|
if char_amount[i] == '4'
res[0] += 3 * 10 ** (char_amount.length - i - 1)
else
res[0] += char_amount[i].to_i * 10 ** (char_amount.length - i - 1)

Keybase proof

I hereby claim:

  • I am idanci on github.
  • I am idanci (https://keybase.io/idanci) on keybase.
  • I have a public key ASAAxIA9-CZp729Yh3Yah2oJvDP1YJIiw58CEiyoZFKQ0Ao

To claim this, I am signing this object: