Skip to content

Instantly share code, notes, and snippets.

var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
if (!fs) {
result.textContent = "check failed?";
return;
}
fs(window.TEMPORARY, 100, function(fs) {
console.log('not in incognito mode');
}, function(err) {
console.log('is in incognito mode');
});
* https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=pt-BR
* https://userstyles.org/styles/browse/github
https://regex101.com/
var hoursOk = {"slotTimes": [
{"hourIni": "10:00", "hourEnd": "11:00"},
{"hourIni":"13:00", "hourEnd": "15:00"},
{"hourIni":"17:00", "hourEnd": "22:00"}
]};
var hoursErrado = {"slotTimes": [
{"hourIni": "10:00", "hourEnd": "11:00"},
{"hourIni":"13:00", "hourEnd": "15:00"},
{"hourIni":"13:30", "hourEnd": "22:00"}
function dataURItoBlob(dataURI) {
// convert base64/URLEncoded data component to raw binary data held in a string
var byteString;
if (dataURI.split(',')[0].indexOf('base64') >= 0)
byteString = atob(dataURI.split(',')[1]);
else
byteString = unescape(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
moment.tz(moment($scope.dateInit, "DD/MM/YYYY"), "America/Sao_Paulo").format();
ls -a list all files including hidden file starting with '.'
ls --color colored list [=always/never/auto]
ls -d list directories - with ' */'
ls -F add one char of */=>@| to enteries
ls -i list file's inode index number
ls -l list with long format - show permissions
ls -la list long format including hidden files
ls -lh list long format with readable file size
ls -ls list with long format with file size
ls -r list in reverse order
$ git config --get-regexp alias
alias.ignored !git ls-files -v | grep ^[[:lower:]]
alias.deleteall ! git branch | grep -v '\*' | xargs git branch -D
alias.refreshremote git remote update --prune
@suuuzi
suuuzi / readme.md
Created April 15, 2016 01:36 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser