\w
get into target mode.
viws<strong>
wrap the word under the cursor in tags.
# | |
# Various handy commands | |
# | |
# Change the author of the previous commit | |
git commit --amend --author="Name <name@domain.com>" | |
# Set a global .gitignore | |
git config --global core.excludesfile ~/.gitignore |
#!/bin/bash | |
# Append the latest commit hash to your PHP constants file after the Git repository received a push. | |
# Path to constants file | |
CONST_PATH = ../../application/config/constants.php | |
# Ask git for the last abbreviated commit hash | |
HASH = `git log -1 --pretty=format:"%h"` |
<?php | |
function time_ago($time) | |
{ | |
$time = (is_numeric($time) ? $time : strtotime($time)); | |
$delta = time() - $time; | |
switch (TRUE) | |
{ | |
case ($delta < 0): |
import os | |
import sys | |
import csv | |
sys.path.insert(0, os.path.abspath('../miner/')) | |
import miner.utils | |
import miner.clustering | |
def render_to_file(space, clusters): |
Web applications are increasingly taking over the functions of native applications. This year has seen an increase of (streaming) audio web applications, such as Rdio, Spotify, Pandora, etc. These applications are long-running applications and provide multimedia to the user, often while the user is doing something else.
Interaction with this type of application works the same as with other applications: the user brings the tab/window in focus and manipulates the application through mouse, keyboard or other input device. Bringing the application into focus is required in order to interact with the application and thus requires the user to get out of the current workflow.
In native applications this problem is fixed by letting applications bind to specific multimedia buttons situated on the keyboard. These buttons serve as a way to interact with the media player without bringing the application into focus. This is currently impossible for web applications for t
I hereby claim:
To claim this, I am signing this object:
var promise = new Ember.RSVP.Promise(function(resolve, reject) { | |
console.log('Promise is pending'); | |
setTimeout(function() { | |
if (Math.random() < 0.7) { | |
resolve({'status': 'ok'}); | |
} | |
reject('Whoops, something went wrong'); | |
}, 1000); |
promise.then(function(response) { | |
console.log(response); | |
return promise; | |
}).then(function(anotherResponse) { | |
console.log(anotherResponse); | |
}).catch(function(error) { | |
console.error(error); | |
}); |
actions: { | |
submitForm: function() { | |
var model = this.store.createRecord('post'); | |
this.resolveKeywords(controller.get('postKeywords')).then(function(keywords) { | |
model.get('keywords').pushObjects(keywords); | |
return model.save(); | |
}).then(function() { | |
controller.transitionToRoute('post', model); | |
}); |