Skip to content

Instantly share code, notes, and snippets.

@makanimason
makanimason / gist:2589890
Last active February 27, 2018 23:26
kinesis keyboard config

net result: http://www.keyboard-layout-editor.com/#/layouts/a3e0e4ed3ba8062b1cfcf454436477f2

the red keys are ones I never press, the orange ones rarely press enable key remapping by pressing Progrm + F12, then sequences of keys: press they key you want it to be first, then the key you will press to get that

general setting

  • reset everything: Progrm + Shift + F2
  • turn off key clicks: Progrm + backslash (right side)

bare minimum needed even with Karabiner full remap

@makanimason
makanimason / gist:1438933
Created December 6, 2011 16:55
create clean git repo from svn trunk
git svn clone --no-metadata -A users.txt svn+ssh://your.repohost.com/svnroot/repo_name/trunk new_git_repo
-- sample users.txt file
gbobinski = George Bobinski <[email protected]>
fthomas = Frank Thomas <[email protected]>
@makanimason
makanimason / find_chars.rb
Last active September 3, 2021 23:35
ruby code to detect non-ascii characters in files
index = 0
str.each_char do |char|
index += 1
unless char.ascii_only?
puts "char at #{index} == ***#{char.inspect}***"
puts str.slice(index - 10, 20)
end
end
@makanimason
makanimason / gist:1049635
Created June 27, 2011 19:40
simple Oracle 11 stored function
CREATE OR REPLACE FUNCTION weekStartingFriday(dayval IN DATE)
RETURN DATE IS
adjustment NUMBER;
BEGIN
adjustment := TO_NUMBER(TO_CHAR(dayval, 'D'));
IF (adjustment >= 6) THEN
adjustment := adjustment - 6;
ELSE
adjustment := adjustment + 1;
END IF;