foo bar foo bar
foo bar foo bar
/* | |
User's sublime-keymap | |
*/ | |
[ | |
{"keys": ["super+t"], "command": "new_file"}, | |
{"keys": ["super+shift+c"], "command": "insert_snippet", "args": {"contents": "console.log(${1:$TM_SELECTED_TEXT});${0}"}} | |
] |
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = true |
function giveLater (num) { | |
return new Promise (function (resolve, reject) { | |
setTimeout(function () { | |
if (num) { | |
resolve(num); | |
return false; | |
} | |
reject('num is empty'); |
<!DOCTYPE html> | |
<html lang="en" class="-capitalise-normal"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>An amazing site</title> | |
<style> | |
@media (max-width: 480px) { | |
.page-title { |
From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim
For those tasks I use most of the time block selection.
Put your cursor on the first #
character, press Ctrl``V
(or Ctrl``Q
for gVim), and go down until the last commented line and press x
, that will delete all the #
characters vertically.
For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V
, and select until the last line. Second, press Shift``I``#``Esc
(then give it a second), and it will insert a #
character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/#
in the second step instead.
>Jarvis, do me a favor and blow Mark 42 Galaxy Note 7
I hereby claim:
To claim this, I am signing this object:
function isPalindromic(textStr) { | |
if (!textStr) { return new Error('Missing string parameter.'); } | |
if (typeof textStr !== 'string') { return new Error('Parameter must be a string.'); } | |
return textStr.split('').reverse().join('') === textStr; | |
} |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |