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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
const authUser = 'USERNAME'; | |
const authPass = 'PASSWORD'; | |
const authString = 'Basic ' + new Buffer(authUser + ':' + authPass).toString('base64'); |
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
#!/usr/bin/env python | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Open App</title> | |
<!-- | |
URL Params: | |
customSchemeURL: Your custom scheme 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Open App</title> | |
<!-- | |
URL Params: | |
customSchemeURL: Your custom scheme 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
class Poller | |
constructor: (name) -> | |
console.log "[#{name}]" | |
@name = name | |
@failed = 0 | |
@interval = 5000 | |
@run = true | |
timeoutID = null |
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
mysql -u [USER] -p[PASSWORD] -B -N $@ -e "SELECT DISTINCT CONCAT( | |
'SHOW GRANTS FOR ''', user, '''@''', host, ''';' | |
) AS query FROM mysql.user" | \ | |
mysql -u [USER] -p[PASSWORD] $@ | \ | |
sed 's/\(GRANT .*\)/\1;/;s/^\(Grants for .*\)/## \1 ##/;/##/{x;p;x;}' |