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
### Keybase proof | |
I hereby claim: | |
* I am charsi on github. | |
* I am charsi (https://keybase.io/charsi) on keybase. | |
* I have a public key whose fingerprint is 09DA 5C6E 6470 B35C EFF2 8CDB C370 01FC A19E A978 | |
To claim this, I am signing this object: |
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
// Code describing how Diffie-Hellman key exchange works. Suprisingly simple to understand. | |
// This does not work because Javascript can't deal with large numbers. | |
let g = 5; | |
let n = 37; | |
let pvtA = 5; | |
let pvtB = 8; |
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
let toEmail = 'TO EMAIL ADDRESS'; | |
let fromEmail = 'FROM EMAIl ADDRESS'; | |
let mgKey = 'INSERT MAILGUN API KEY'; | |
exports.handler = function(context, event, callback) { | |
//var mailgun = require('mailgun-js')({apiKey: context.MG_KEY, domain: context.MG_DOMAIN}); | |
var domain = fromEmail.split('@')[1]; | |
var mailgun = require('mailgun-js')({apiKey: mgKey, domain: domain}); | |
var number = event.From; | |
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
const dns = require('dns'); | |
let sipUri = '[email protected]'; // Any sip uri using srv records should work | |
let protocol = 'udp'; | |
let region = 'us2' ; | |
exports.handler = function(context, event, callback) { | |
var user = sipUri.split('@')[0]; | |
var host = sipUri.split('@')[1]; |
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/sh | |
# This script checks for internet connectivity on your wan port and sends a pushover message if there has been a change. | |
# Multiple WAN ports supported. | |
# Based on Scripts from Wob_76 & WaLLy3K at http://www.linksysinfo.org/index.php?threads/wan-up-down-notifications-script-multiwan.73057/ | |
# Set the Number of WANS (Valid Numbes 1 to 4) | |
WANS=2 | |
# Name your ISPs | |
WAN1_name="Excitel" |
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
# Fetches random puppy images and save sthem to images.txt | |
# Useful for populating dummy data | |
import urllib | |
import json | |
import requests | |
numberOfImages = 141 | |
validateUrls = True # slows script execution |