A little lookup for commands I use frequently
- Commit all edited files and add a message
git commit -a -m "My commit"
- Add all new files
git add .
// create a new store | |
var store = new Lawnchair({adaptor:'dom', table:'people'}); | |
// saving documents | |
store.save({name:'brian'}); | |
// optionally pass a key | |
store.save({key:'config', settings:{color:'blue'}}); | |
// updating a document in place is the same syntax |
{ | |
"files": | |
{ | |
"backbone": "http://documentcloud.github.com/backbone/backbone.js", | |
"backbone-min": "http://documentcloud.github.com/backbone/backbone-min.js", | |
"jquery": "http://code.jquery.com/jquery.min.js", | |
"json2": "https://github.com/douglascrockford/JSON-js/raw/master/json2.js", | |
"normalize": "https://raw.github.com/necolas/normalize.css/master/normalize.css", | |
"raphael": "http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js", | |
"reset": "http://meyerweb.com/eric/tools/css/reset/reset.css", |
<?php | |
// Resizer and Image Manipulation | |
// Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
public function post_edit_logo($id) | |
{ | |
$rules = array( | |
'image' => 'image', | |
); |
{ | |
"files": | |
{ | |
"Dojo": "http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js", | |
"MooTools": "http://mootools.net/download/get/mootools-core-1.4.5-full-compat-yc.js", | |
"PrototypeJS": "https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js", | |
"jQuery": "http://code.jquery.com/jquery.min.js", | |
"jQueryUI": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js", | |
"normalize.css": "https://github.com/necolas/normalize.css/raw/master/normalize.css", | |
"jquery": "http://code.jquery.com/jquery.min.js", |
describe('controllerCtrl', function () { | |
var $controller, | |
$rootScope, | |
$scope; | |
beforeEach(module('controller')); | |
beforeEach(inject(function ($injector) { | |
$controller = $injector.get('$controller'); | |
$rootScope = $injector.get('$rootScope'); |
# place to git, ipkg, another shell commands | |
PATH=/volume1/@optware/bin:$PATH | |
export PATH | |
# more useful prompt shell | |
#PS1="`hostname`> " | |
PS1='\u@\h:\w' | |
case `id -u` in | |
0) PS1="${PS1}# ";; |
/** | |
* Custom "toHaveClass" matcher. | |
* | |
* Based on https://gist.github.com/darthwade/9305669 | |
* and https://gist.github.com/elgalu/94284ec0ac3e8a590507 | |
* | |
* usage : | |
* require('./toHaveClass.js'); | |
* ... | |
* expect($('html')).toHaveClass('wf-active'); |
alias composer='php composer.phar' | |
alias composerinit='curl -s http://getcomposer.org/installer | php; composer init; echo composer.phar >> .gitignore' | |
alias composerdump='composer dumpautoload --optimize' |
A little lookup for commands I use frequently
git commit -a -m "My commit"
git add .
// Came from the comments here: https://gist.github.com/maruf-nc/5625869 | |
app.filter('titlecase', function() { | |
return function (input) { | |
var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; | |
input = input.toLowerCase(); | |
return input.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title) { | |
if (index > 0 && index + match.length !== title.length && | |
match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" && | |
(title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && |