This file contains hidden or 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
| echo 'Loading test_index mapping' | |
| curl -XPUT localhost:9200/test_index -d '{ | |
| "mappings":{ | |
| "user":{ | |
| "_id":{ | |
| "path":"userID" | |
| }, | |
| "_routing":{ | |
| "path":"userID" | |
| }, |
This file contains hidden or 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
| 'use strict' | |
| angular.module('uploadApp', [ | |
| 'flow' | |
| 'ngJcrop' | |
| ]).config [ | |
| 'flowFactoryProvider' | |
| 'ngJcropConfigProvider' | |
| (flowFactoryProvider, ngJcropConfigProvider) -> |
This file contains hidden or 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
| //// If short | |
| fnThatReturnsPromise('some val').catch(function () { | |
| // handleError | |
| }).then(functionThatLogsSomething) // Here we're assuming that there's no way this function can error out. If it can then do the next format | |
| //// Or | |
| // One pair | |
| fnThatReturnsPromise('some val').catch(function () { | |
| // handleError |
This file contains hidden or 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
| "use strict"; | |
| var fs = require('fs'), | |
| cs = require('coffee-script'), | |
| os = require('os'), | |
| glob = require('glob'), | |
| beautify = require('js-beautify').js_beautify, | |
| mkdirp = require('node-mkdirp'); | |
| var path = require('path'); |
This file contains hidden or 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
| var start = 0; // starts from the first video | |
| var end = 9; // deletes the first ten videos, set to -1 to remove all | |
| var removeButtons = Array.prototype.slice.call(document.querySelectorAll('.pl-video .pl-video-edit-remove'), start, end); | |
| // gathers all of the remove buttons and triggers a click event on all of the selected with a 250 ms interval | |
| removeButtons.forEach(function (elem, index) { setTimeout(function () { console.log('removing index ' + index); elem.click() }, index * 250) }) |
This file contains hidden or 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
| #!/usr/bin/env node | |
| // This precommit checks if certain staged files changed, and updates the version number of a correllating file, then `git add`s that file to be committed as well | |
| // Useful for breaking caches like in WordPress which will serve the same CSS or JS if you forget to increment the version | |
| // | |
| // Example test usage after you added your program and regex match at the end of the `defaultArgs` (line 26) | |
| // `git add assets/dist/community-directory.js` // A file correlating to `programs` (line 46) | |
| // `node .git/hooks/precommit -s=true` // Will simulate a change | |
| // `node .git/hooks/precommit -t=major` // Updates the version, increments the major value '1.5.5' => '1.6.0' |
OlderNewer