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 cryptojs = require('crypto') | |
, salt = "<client app salt token>" | |
, keyIterations = 1000 //number of interations to generate your key | |
, keyLength | |
, key | |
, password | |
, cipher | |
, msg = "<what you want to encrypt>" | |
, encryptedMsg; |
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
//capture ipad device change (IOS7) tested. | |
function doOnOrientationChange() | |
{ | |
// alert(window.orientation); | |
switch(window.orientation) | |
{ | |
case 0: | |
case 90: | |
// alert('portrait'); | |
$('html').removeClass('landscape').addClass('portrait'); |
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
/* | |
http://www.jquery4u.com/snippets/url-parameters-jquery/ | |
*/ | |
$.urlParam = function(name){ | |
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
return results[1] || 0; | |
} |
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
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling |
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
coverage: { | |
options: { | |
// required for output on index.html base filepath | |
base: __dirname + 'test/coverage/', | |
// required to override base to make the directory browseable | |
directory: __dirname + 'test/coverage/', | |
port: '5555', | |
keepalive: 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
#------------------------------------------------------------- | |
# Git Alias Commands | |
#------------------------------------------------------------- | |
alias g="git status" | |
alias ga="git add" | |
alias gaa="git add ." | |
alias gau="git add -u" | |
alias gc="git commit -m" | |
alias gca="git commit -am" | |
alias gb="git branch" |
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 _functionName(url) { | |
return Q.fcall(function () { | |
var deferred = Q.defer(); | |
var options = { | |
url: url, | |
headers: { | |
'User-Agent': 'my-app' | |
}, |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
# Redirect root requests | |
RewriteCond %{REQUEST_URI} ^/$ | |
RewriteRule !^/ /back-end/public%{REQUEST_URI} [L] |
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
/** | |
* CSRF Token Security. | |
*/ | |
(function() { | |
angular.module("app").config(['$httpProvider', function ($httpProvider) { | |
//check for token in meta tag | |
var csrf_token = $('meta[name=csrf-token]').attr('content'); |
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
{ | |
"minimum_web_client_version": "master-1094" | |
} |
OlderNewer