- generate a public/private key pair in
~/.ssh/keys
- add the public key to your bitbucket account
- copy your private key to your user's home directory on your server
scp -i "campsite-geo.pem" bitbucket_rsa USERNAME@REMOTE-IP:/home/USERNAME/.ssh/keys/bitbucket_rsa
- add bitbucket to your ssh config file
printf "Host bitbucket.org\n User git\n IdentityFile ~/.ssh/keys/bitbucket_rsa" >> ~/.ssh/config
- make sure your .ssh folder has the right permissions
chmod 700 ~/.ssh
- make sure your private key has the right permissions
chmod 600 ~/.ssh/keys/bitbucket_rsa
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
function throttle(fn, threshhold, scope) { | |
threshhold || (threshhold = 250); | |
var last, | |
deferTimer; | |
return function () { | |
var context = scope || this; | |
var now = +new Date, | |
args = arguments; | |
if (last && now < last + threshhold) { |
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
let tree = { | |
name: "A", | |
parent: { | |
name: "B", | |
parent: { | |
name: "C", | |
parent: { | |
name: "" | |
} | |
} |
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
function remote(action) { | |
const actions = { open, close, reset }[action]() | |
function open() { console.log('opened') } | |
function close() { console.log('closed') } | |
function reset() { console.log('reset') } | |
} | |
remote('open') // 'opened' |
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
exportcsv.$inject = ['$sce'] | |
function exportcsv($sce) { | |
const defaultOptions = { | |
filename: 'export' | |
} | |
return { toCSV } |
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
export default function NgReduxStub() { | |
const ctrl = this | |
ctrl.selectedState = "" | |
ctrl.target = "" | |
ctrl.mapState = (state) => ({}) | |
ctrl.push = (selectedState) => { | |
if (!isPlainObject(selectedState)) { | |
throw 'selectedState must be a plain object' | |
} |
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
// assumes the existence of a React component called `component` | |
const el = this.refs.sidebar.getDOMNode() | |
let startPos, startTransition | |
component.addEventListener('mousedown', startDragging) | |
component.addEventListener('touchstart', startDragging) | |
function getMousePosition (e) { | |
var pos = { |
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
diff --recursive --unified --exclude test --exclude Makefile 3.0.0-beta-3/CHANGES.md 3.0.1/CHANGES.md | |
--- 3.0.0-beta-3/CHANGES.md 2016-09-21 12:03:36.000000000 -0400 | |
+++ 3.0.1/CHANGES.md 2016-11-08 17:27:02.000000000 -0500 | |
@@ -1,3 +1,63 @@ | |
+## v3.0.1 | |
+ | |
+* More API adjustments to align with native Promises | |
+ - Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)` | |
+ - Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)` | |
+* When a `wait()` condition times out, the returned promise will now be |
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
module.exports = Emitter | |
function Emitter () { | |
if (!(this instanceof Emitter)) return new Emitter() | |
this._listeners = {} | |
} | |
Emitter.prototype.emit = function (eventName, data) { | |
const listeners = this._listeners[eventName] |
OlderNewer