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
#!/bin/bash | |
set -e | |
# Get the list of changed files since the last commit | |
changed_files=$(git diff --name-only HEAD~1..HEAD) | |
if [ -z "$changed_files" ]; then | |
echo "No changes since the last commit." | |
exit 0 |
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
import sublime | |
import sublime_plugin | |
class ChangeViewFontSizeCommand(sublime_plugin.TextCommand): | |
def run(self, edit, by): | |
settings = self.view.settings() | |
settings.set("font_size", settings.get("font_size") + by) |
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
// These shortcuts go easy on your wrists if you remap CAPS -> Ctrl. | |
[ | |
{ "keys": [",", "/"], | |
"context": [ | |
{ "key": "setting.command_mode", "operand": true }, | |
{ "key": "setting.is_widget", "operand": false } | |
], | |
"command": "toggle_comment", | |
"args": { "block": false } | |
}, |
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
#!/bin/bash | |
# Converts camelCased words into snake_cased ones. | |
# (This might be seful when you have to convert a JS object into an Elixir one.) | |
# TODO: Ignore quoted strings. | |
function camel_to_snake_case { | |
while read -r line; do | |
echo $line | sed 's/\(.\)\([A-Z]\)/\1_\2/g' | tr '[:upper:]' '[:lower:]' | |
done | |
} |
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
{ | |
// http://www.sublimetext.com/docs/3/themes.html | |
"variables": { | |
"quick_panel_matched_label_color": "#ed2460", | |
}, | |
"rules": [ | |
{ | |
"class": "text_line_control", | |
"parents": [{"class": "overlay_control"}], | |
"font.face": "Iosevka Fixed", |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>github.com/jzelenkov</string> | |
<key>colorSpaceName</key> | |
<string>sRGB</string> | |
<key>gutterSettings</key> | |
<dict> |
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
// These shortcuts go easy on your wrists if you remap CAPS -> Ctrl. | |
[ | |
{ "keys": [",", "/"], | |
"context": [ | |
{ "key": "setting.command_mode", "operand": true }, | |
{ "key": "setting.is_widget", "operand": false } | |
], | |
"command": "toggle_comment", | |
"args": { "block": false } | |
}, |
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
#!/bin/bash | |
# This is a wraper around the standard find command that excludes directories | |
# we typically want to ignore while working with source code. | |
# This function is handy when we are trying to fuzzy find files using tools like | |
# *selecta* | |
find * -type f \ | |
-not -path "_build/**" \ | |
-not -path "bin/**" \ | |
-not -path "deps/**" \ | |
-not -path "doc/**" \ |
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
execute pathogen#infect() | |
syntax on | |
syntax enable | |
filetype plugin indent on | |
colorscheme monokai_pro | |
set cursorline | |
highlight CursorLine ctermbg=333333 |
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
#!/bin/bash | |
function frequently_changed_files { | |
git log --name-only --pretty=format: | sort | uniq -c | sort -nr | |
} | |
# Find classes names on a given file. | |
function find_classes { | |
filename=$1 | |
# Possible matches: |
NewerOlder