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 isNotificationEnabled() { | |
if(!window.Notification) { | |
console.log('Oooh no! Your browser is too old!'); | |
return false; | |
} | |
return 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
function RequestPermission(callback){ | |
callback = callback || function(status) { | |
console.log('Status da permissão: ' + status); | |
callback(status === "granted"); | |
}; | |
Notification.requestPermission(callback); | |
} |
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 RequestPermission(callback){ | |
callback = callback || function(status) { | |
console.log('Status da permissão: ' + status); | |
callback(status === "granted"); | |
}; | |
Notification.requestPermission(callback); | |
} | |
function SendNotification(message, callback){ |
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 isNotificationEnabled() { | |
if(!window.Notification) { | |
console.log('Oooh no! Your browser is too old!'); | |
return false; | |
} | |
return true; | |
} | |
function RequestPermission(callback){ |
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 notifyClient(message) { | |
alert(message); | |
} | |
function sendMail(customer, total) { | |
notifyClient.call(this, 'TODO: Send mail, (' + String(customer.id) + ', ' + String(total) + ')'); | |
} | |
function getDeals() { | |
var product = arguments[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
function notifyClient(message) { | |
alert(message); | |
} | |
function sendMail(customer, total) { | |
notifyClient.call(this, `TODO: Send mail, (${String(customer.id)}, ${String(total)})`); | |
} | |
function getDeals() { | |
var product = arguments[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
--- | |
- hosts: home | |
vars: | |
host_port: 80 | |
expose_port: 9000 | |
portainer_endpoint: "http://localhost:{{ host_port }}/api" | |
tasks: | |
- name: Ensure portainer container is running |
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
#/bin/bash | |
SOURCE=$1 | |
TARGET=$2 | |
mkdir -p $TARGET | |
echo "Extracting 7z files from $SOURCE to $TARGET" | |
7z x "$SOURCE/*.7z" -o"$TARGET" | |
# how to use -> extract-7z-files.sh /tmp/source /tmp/target |
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 randomString() | |
{ | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
for( var i=0; i < 5; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} |
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
MY_WEAK_PASSWORD=X | |
MY_STRONG_PASSWORD=QJJ0S81ogYX5iJebUM4LN1FOFFuQKo0B | |
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE | |
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |