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
#!/bin/bash | |
#Precommit hook to prevent "debugger" and "console.log" | |
#Note: to enamble precommit on Windows machine don't forget add path to Git\bin and Git\cmd to PATH environment variable | |
count=0 | |
for FILE in `git diff-index --name-status HEAD -- | cut -c3-` ; do | |
# Check if the file contains 'debugger' or 'console.log' | |
contains=`grep -e "debugger" -e "console\.log" -e "binding\.pry" $FILE` | |
if [ `grep -e "debugger" -e "console\.log" -e "binding\.pry" $FILE|wc -l` -ne 0 ] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Set the viewport to show the page at a scale of 1.0, and make it non-scalable --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | |
<script src="cordova.js"></script> | |
</head> | |
<body> |
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 onFileSystemError = function onFileSystemError() { | |
alert('the was an error during access to filesystem'); | |
}; | |
var remove_file = function(entry) { | |
entry.remove(function() { | |
self.model.remove(); | |
self.model.set('synced',false); | |
self.render(); | |
}, onFileSystemError); | |
}; |
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 cache = (function() { | |
'use strict'; | |
var TTL_POSTFIX = 'time2live'; | |
var TTE_POSTFIX = 'time2expire'; | |
function _hasLocalStorage() { | |
if (!window.localStorage) { | |
throw new Error('you have no localStorage'); | |
} | |
} | |
function _removeCachedKey(key) { |
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
#!/bin/bash | |
# The output of all these installation steps is noisy. With this utility | |
# the progress report is nice and concise. | |
function install { | |
echo installing $1 | |
shift | |
apt-get -y install "$@" >/dev/null 2>&1 | |
} |