This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Settings in here override those in "Default/Base File.sublime-settings", and | |
// are overridden in turn by file type specific settings. Place your settings | |
// here, to ensure they're preserved when upgrading. | |
{ | |
"tab_completion": false, | |
"rulers": [140], // Columns in which to display vertical rulers | |
"word_wrap": false, | |
"highlight_line": false, | |
"caret_style": "wide", // Valid values are "smooth", "phase", "blink", "wide" and "solid". | |
"line_padding_top": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int countBits1(long x) { | |
int c = 0; | |
long v = x; | |
while (v!=0) { | |
v &= v - 1; | |
c++; | |
} | |
return c; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def m(x): return -1 if x%3 else 1 | |
def g(x): return cmp(2.5-x, 0) | |
print ''.join(chr(ord('a') + x) | |
for x in reduce( | |
lambda x,y: x+[x[-1]+y*m(len(x)-1)] if isinstance(x,list) else [x,x+y], | |
reduce( | |
lambda x,y: x+[x[-1]+g(y-2)*(y-2+cmp(g(y-2)+m(y-1),0)*cmp(6-y,0))+(8-y)*m(y-1)] if x else [15], | |
range(7) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Support for understanding files/folders to ignore (from .gitignore or .svnignore) | |
These classes should be reusable, can be moved to a library | |
Example usage: | |
ignored_file = IgnoredFiles(mypath) | |
for root, dirs, files in os.walk(mypath): | |
ignored_files.remove_ignored_folders(root, dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; -- Remap Alt -> Ctrl on Windows (to behave like ⌘CMD+key on mac) | |
; Via https://www.autohotkey.com/docs/misc/Remap.htm | |
; Alt+key on Windows is just a general shortcut to application menu... | |
; I find that undesirable/annoying, and prefer to simply have all Alt+key combinations be CTRL+key instead | |
; Benefits: | |
; - CMD is much more natural to hit (less finger stretching to reach CTRL) | |
; - no UI menu distractions while using keyboard | |
; - makes it easy to configure many dev tools in the same way on mac/Windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; -- Remap Alt -> Ctrl on Windows (to behave like ⌘CMD+key on mac) | |
; Via https://www.autohotkey.com/docs/misc/Remap.htm | |
; This remaps Alt -> Ctrl completely, except for Alt+Tab and Alt+F4 | |
#SingleInstance ignore | |
SetCapsLockState, AlwaysOff ; disable caps lock entirely | |
CapsLock::return | |
RAlt::RCtrl ; Right Alt key is simply mapped to Ctrl, RAlt+Tab won't work as usual (only LAlt+Tab will) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My config for https://starship.rs/ | |
# It's minimalistic, I like single-line prompts, features: | |
# - show active python version when non-system python is on PATH | |
# - show duration only when last command took more than 5s | |
format="$cmd_duration$custom$directory$character" | |
add_newline = false | |
[directory] | |
format = "[$path]($style)[$read_only]($read_only_style)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Non staggered, compact", | |
"author": "Zoran Simic" | |
}, | |
[ | |
"Esc", | |
{ | |
"x": 0.5 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Key Mappings": { | |
"0x2a-0x200000": { | |
"Action": 12, | |
"Text": "*" | |
}, | |
"0x2b-0x200000": { | |
"Action": 12, | |
"Text": "+" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Compact, staggered", | |
"author": "Zoran Simic" | |
}, | |
[ | |
{ | |
"c": "#768e72" | |
}, | |
"Esc", |
OlderNewer