This file contains hidden or 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/sh | |
| # set -x verbose #echo on | |
| # Find files with trailing whitespace | |
| for file in `git diff --check --cached | grep '^[^+-]' | grep -o '^.*[0-9]\+:'` ; do | |
| file_name=`echo ${file} | grep -o '^[^:]\+'` | |
| line_number=`echo ${file} | grep -oP '(?<=:)[0-9]+(?=:)'` | |
| sed -i '' "${line_number}s/[[:space:]]*$//" ${file_name} | |
| git add ${file_name} | |
| done |
This file contains hidden or 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
| $ cat Makefile | |
| .PHONY: all clean | |
| all: check-env | |
| echo $(ENV) | |
| clean: | |
| echo "clean" | |
| check-env: |
This file contains hidden or 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
| unlet b:current_syntax | |
| syn include @HTML $VIMRUNTIME/syntax/html.vim | |
| syn region htmlTemplate start=+<script [^>]*type *=[^>]*text/template[^>]*>+ | |
| \ end=+</script>+me=s-1 keepend | |
| \ contains=@HTML,htmlScriptTag,@htmlPreproc |
This file contains hidden or 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
| app.SettingsView = Marionette.ItemView.extend({ | |
| // ... | |
| initialize: function() { | |
| this.whitelist = new app.TopicsWhitelist(); | |
| }, | |
| ui: { | |
| 'topics': '#topics .checkboxes' | |
| }, |
This file contains hidden or 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
| render: function() { | |
| this.$el.append(this.topicViews.map(function(view) { | |
| return view.render().el; | |
| })); | |
| return this; | |
| } | |
| render: function() { | |
| this.$el.append( |
This file contains hidden or 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
| ; 1. Stage the changes you want to have amended to the earlier commit | |
| ; 2. `$ git fix <revision>` (e.g. `git fix HEAD~4`or `git fix bbfba98`) | |
| [alias] | |
| fix = "!_() { c=$(git rev-parse $1) && git commit --fixup $c && if grep -qv \"No local changes\" <<<$(git stash); then s=1; fi; git -c core.editor=cat rebase -i --autosquash $c~; if [[ -n "$s" ]]; then git stash pop; fi; }; _" |
This file contains hidden or 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
| this.listenTo(app.settings, 'change', this.refresh.bind(this, 'cache')); | |
| refresh: function(arg) { | |
| var type; | |
| if (arg === 'cache') { | |
| // HACK: 'change' fires twice on settings when resetting, | |
| // once from resetting to defaults and again from setting the | |
| // topics. This makes sure that refresh is called only once | |
| // when resetting. | |
| if (app.settings.get('topics') === undefined) { |
This file contains hidden or 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
| diff --git a/main.js b/main.js | |
| index 93ed992..2f46a9b 100644 | |
| --- a/main.js | |
| +++ b/main.js | |
| @@ -233,7 +233,12 @@ var refreshButton = function(opts) { | |
| } | |
| var getWilting = function(obj) { | |
| - return (obj && (obj.wiltingReduced || obj.wilting)) || 0; | |
| + if (obj === undefined) { return 0; } |
This file contains hidden or 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
| set -g base-index 1 | |
| setw -g mode-keys vi | |
| set -g default-terminal "screen-256color" | |
| # act like GNU screen | |
| unbind C-b | |
| set-option -g prefix C-f | |
| setw -g aggressive-resize on | |
| set-option -g renumber-windows on | |
| # split windows like vim |
This file contains hidden or 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
| utils = require '../utils' | |
| uglifyFiles = | |
| 'options/js/options.min.js' : ['dist/options.concat.js'] | |
| 'lib/common.min.js' : ['dist/common.concat.js'] | |
| 'lib/main.min.js' : ['dist/main.concat.js'] | |
| uglifyFiles = utils.prependPath uglifyFiles, "build/" | |
| module.exports |