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
var s = "some_string_to_change", | |
len= s.length, | |
i, | |
upped = false; // we will use this to make sure we don't double count a character | |
result = ""; // this is where we will store the result | |
for(i=0;i<len;i++) { | |
if(s[i] === "_") { // if we find an underscore | |
result += s[i+1].toUpperCase(); // add the next character, uppercased, to our result | |
upped = true; // make sure we don't add this character again |
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
var s = "some_string_to_change", | |
len= s.length, | |
i, | |
upped = false; | |
result = ""; | |
for(i=0;i<len;i++) { | |
if(s[i] === "_") { | |
result += s[i+1].toUpperCase(); | |
upped = true; |
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
# Install the Parse Command Line Tool | |
export TMP_FILE=/tmp/parse.tmp | |
export latest=`curl -X GET https://api.parse.com/1/supported?version=latest|grep -Po '(\d.\d.\d)'` | |
export url="https://github.com/ParsePlatform/parse-cli/releases/download/release_${latest}/parse_linux" | |
curl --progress-bar --compressed -Lo ${TMP_FILE} ${url} | |
mv /tmp/parse.tmp ${HOME}/bin/parse | |
chmod 755 ${HOME}/bin/parse | |
# Avoid login prompt by using a Parse account key | |
# Note: Make sure you have created an account key at https://dashboard.parse.com/account/overview |
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
/** | |
* This Gist has been modified to use a custom flag on the config object instead of an HTTP Header in order to | |
* indicate wether or not to specifically handle the error. | |
* THIS CODE IS UNTESTED!! | |
*/ | |
//var HEADER_NAME = 'MyApp-Handle-Errors-Generically'; // We don't want to use Headers, we use a flag on the config object instead | |
var specificallyHandleInProgress = false; | |
angular.module('myApp').factory('RequestsErrorHandler', ['$q', function($q) { |
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
/** | |
* Original code developed by Robert Nyman, http://www.robertnyman.com | |
* Code/licensing: http://code.google.com/p/getelementsbyclassname/ | |
* | |
* Arcnovus modifications: | |
* - Tweaked code to pass JSLint validation (all vars declared together, no more assignment in expressions). | |
* - Added 'item' method to array returned in order to mimick nodeList | |
*/ | |
(function (window, document) { | |
'use strict'; |
NewerOlder