create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
/* EventManager, v1.0.1 | |
* | |
* Copyright (c) 2009, Howard Rauscher | |
* Licensed under the MIT License | |
*/ | |
(function() { | |
function EventManager() { | |
this._listeners = {}; |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
/** | |
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object | |
* | |
* @param string url | |
* @param object callback | |
* @param mixed data | |
* @param null x | |
*/ | |
function ajax(url, callback, data, x) { | |
try { |
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
#!/usr/bin/env php | |
<?php | |
/** | |
* Add this file as "prepare-commit-msg" under /my-project/.git/hooks directory | |
* and make it executable. (chmod +x) | |
* | |
* Example: | |
* If Branchname was: "release/MYPRO-1-awesome-feature" | |
* and the commit message you typed in are: "Take this" |
var Index = React.createClass({ | |
getInitialState: function () { | |
return { | |
lastPress: 0 | |
} | |
}, | |
onPress: function () { | |
var delta = new Date().getTime() - this.state.lastPress; |
# TextMate tutorial: http://manual.macromates.com/en/language_grammars | |
# Regex to convert keys to unquoted: '(include|match|captures|begin|end|beginCaptures|endCaptures|name|patterns|0|1|2|3|4|5|6|7|8|9|comment|fileTypes|scopeName|repository|contentName|firstLineMatch|foldingStartMarker|foldingStopMarker)': | |
scopeName: 'source.<scope>' # <scope> should be a short, unique indicator for the language ("js", "php", "c", etc.) | |
name: '<name>' # The title that will show up in grammar selection and on your status bar. | |
fileTypes: [ # An array of file extensions. | |
'txt' | |
'exif' | |
] |
const rules = [ | |
{ type: 'space', regex: /^\s/ }, | |
{ type: 'lParen', regex: /^\(/ }, | |
{ type: 'rParen', regex: /^\)/ }, | |
{ type: 'number', regex: /^[0-9\.]+/ }, | |
{ type: 'string', regex: /^".*?"/ }, | |
{ type: 'variable', regex: /^[^\s\(\)]+/ } // take from the beginning 1+ characters until you hit a ' ', '(', or ')' // TODO - support escaped double quote | |
]; | |
None of the string methods modify this
– they always return fresh strings.
charAt(pos: number): string
ES1
Returns the character at index pos
, as a string (JavaScript does not have a datatype for characters). str[i]
is equivalent to str.charAt(i)
and more concise (caveat: may not work on old engines).
git branch | grep -v "master" | xargs git branch -D |