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
| ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
| ## Libs | |
| ## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
| import multiprocessing | |
| import subprocess | |
| import librato | |
| import json | |
| import sys | |
| import os |
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
| while /bin/true; | |
| do for ns in 205.251.195.139 208.78.71.19 205.251.192.22 205.251.196.103 204.13.251.19 208.78.70.19 205.251.199.187 204.13.250.19; | |
| do NOW=`date`; | |
| echo -ne "$NOW\tTesting $ns\t"; | |
| dig +time=1 +tries=1 +norecurse pubsub.pubnub.com @$ns | grep -oE 'status: [^,]+'; | |
| done; | |
| sleep 30; | |
| done | tee logs |
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
| $ dig +notcp +tries=1 +norecurse @208.78.70.19 ps.pndsn.com | |
| ; <<>> DiG 9.8.1-P1 <<>> +notcp +tries=1 +norecurse @208.78.70.19 ps.pndsn.com | |
| ; (1 server found) | |
| ;; global options: +cmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 55220 | |
| ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;ps.pndsn.com. IN A |
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> | |
| <form id='loginForm'> | |
| <input id='username' placeholder='Pick a username!' /> | |
| <input type='submit' value='Log In'> | |
| </form> | |
| <form id='callForm'> | |
| <input id='number' placeholder='Enter user to dial!' /> | |
| <input type='submit' value='Call'/> |
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
| USER="$1" | |
| echo "Making user account for: $USER" | |
| useradd -m -d /home/$USER -s /bin/bash $USER | |
| usermod -aG sudo $USER | |
| mkdir /home/$USER/.ssh | |
| touch /home/$USER/.ssh/authorized_keys | |
| chmod 700 /home/$USER/.ssh | |
| chmod 600 /home/$USER/.ssh/authorized_keys |
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
| echo -n "Hello how are you?" | \ | |
| openssl enc -e -base64 -aes-256-cfb -nopad -nosalt \ | |
| -k `echo -e "$RANDOM $RANDOM $RANDOM" | base64` |
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
| export default (request, response) => { | |
| const pubnub = require('pubnub'); | |
| const kvstore = require('kvstore'); | |
| const xhr = require('xhr'); | |
| let headersObject = request.headers; | |
| let paramsObject = request.params; | |
| let methodString = request.method; | |
| let bodyString = request.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
| <script type="text/javascript" src="js/PushNotification.js"></script> | |
| <script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> |
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
| $('#toggle').click(function(e){ | |
| pubmsg = { "req" : "toggle" }; | |
| var publishConfig = { | |
| channel : 'gpio-raspberry-control', | |
| message : pubmsg | |
| } | |
| pubnub.publish(publishConfig, function(status, response) { | |
| console.log(status, response); |
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
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
| <script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
| <script src="https://cdn.pubnub.com/webrtc/webrtc.js"></script> |