Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| // manage a webapp. | |
| // place <link rel="app-manifest" href="path-to-manifest.webapp"> in your <head> | |
| // mozApp.install() attempts installation | |
| // mozApp.uninstall() removes | |
| // mozApp.isRunning() indicates whether the app is currently installed and open | |
| var mozApp = (function() { | |
| var manLink = document.querySelector('link[rel="app-manifest"]'), | |
| manifestURL = manLink.href; | |
| var self = false; |
| _prompt() { | |
| local _prompt=$1 | |
| local _out=$2 | |
| local _default=$3 | |
| local _val='' | |
| if [ $_default ]; then | |
| _prompt="${_prompt} [${_default}]" | |
| fi | |
| read -p "$_prompt " _val | |
| if [ $_val ]; then |
Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| SELECT table_numerator.ds, table_numerator.numerator AS clicks, table_denominator.denominator AS searches, round((table_numerator.numerator/ table_denominator.denominator), 2) AS CTR | |
| FROM | |
| ( | |
| select ds, count(*) AS numerator | |
| FROM research_logs | |
| WHERE | |
| ds > '2012-10-09' | |
| AND `domain`='support.mozilla.com' | |
| AND ip_address != 'NULL' AND http_version = 200 AND request_type = 'GET' | |
| AND parse_url(empty_string_1,'PATH') RLIKE '\\/en-US\/search\$' |
| /* | |
| Based on Rick Strahl code | |
| http://www.west-wind.com/weblog/posts/2008/Mar/18/A-simple-formatDate-function-for-JavaScript | |
| Contributors: | |
| Clauber Stipkovic - @clauberhalic | |
| Mário Rinaldi - @MarioRinaldi | |
| */ | |
| Date.prototype.formatDate = function (format) { |
Sprints work pretty well, but they can get messy when contributors start being involved, or when bugs overflow the time boundaries of a sprint (ie a bug was started near the end of a sprint, and isn't finished at the end of the sprint). Sometimes sprints can feel like "mini waterfalls". On the other hand, sprints have the advantage of letting PMs easily define what work should be done, and helping this information flow from PMs to developers. They also help timebox projects, so that we can say "this will be done during this two week cycle. This predictability is important. Surprised estimations are teh suck. It isn't fair to ask a developer to make an estimate on something that they haven't worked on before without time to do some research.
Goals:
| for file in `git diff-tree --no-commit-id --name-only -r HEAD | sort | uniq` | |
| do | |
| if [ ${file: -3} == ".py" ] | |
| then | |
| flake8 --ignore=E121,E123,E124,E125,E126,E127,E128 $file | |
| fi | |
| if [ ${file: -3} == ".js" ] | |
| then | |
| jshint $file | |
| fi |
| #!/bin/bash | |
| function remote_by_name() { | |
| name=$1 | |
| remote_line=$(git remote -v | grep push | grep $name) | |
| if [[ -z $remote_line ]]; then | |
| echo "Error: remote '$name' not found." | |
| exit 1 |
| # coding=UTF-8 | |
| from __future__ import division | |
| import re | |
| # This is a naive text summarization algorithm | |
| # Created by Shlomi Babluki | |
| # April, 2013 | |
| class SummaryTool(object): |