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
Shopping List | |
1) USB 3.0 to SATA cable or equivalent 2.5 case with no on / off switch | |
- https://www.amazon.com/gp/product/B00HJZJI84/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1 | |
2) RPi Power Supply | |
- https://www.amazon.com/gp/product/B07TYQRXTK/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1 | |
3) Class 10 MicroSD (64GB) | |
- https://www.amazon.com/gp/product/B07FCMBLV6/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1 | |
4) 1 TB SSD internal 2.5 inch drive | |
- https://www.amazon.com/gp/product/B08QBJ2YMG/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1 | |
5) RPi Case with Fan |
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
<?php | |
$inFile = "encrypted.xml"; | |
$outFile = "decrypted.xml"; | |
$privateKeyFile = "private_key.pem"; | |
$header = '<?xml version="1.0" encoding="UTF-8"?>'; | |
//----------------------------------------------- | |
function rsaDecryptWithKeyString($encryptedData, $rsaPrivKey){ |
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 get_curr_coinmarketcap_price(crypto_id, unused_param) { | |
// note that the unused_param is to to force the function to rerun | |
// and recalcuate the functions results when the function is called with | |
// new input | |
// https://stackoverflow.com/questions/17341399/refresh-data-retrieved-by-a-custom-function-in-google-spreadsheet | |
// create a string that is the first part of our API calls url | |
var url1 = 'https://yourserver.com/crypto-prices.php?crypto_id='; |
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
<?php | |
$cryptoID = $_GET["crypto_id"]; | |
$requestUrl ='https://api.coinmarketcap.com/v1/ticker/' . $cryptoID . '/'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $requestUrl); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($ch, CURLOPT_HEADER, FALSE); |
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
@isTest | |
private class SlackOpportunityPublisherTest { | |
static testMethod void testPostToSlack() { | |
SlackOpportunityPublisher.Oppty opt = new SlackOpportunityPublisher.Oppty(); | |
opt.opptyOwnerName = 'Test'; | |
opt.acctName = 'Test'; | |
opt.acctIndustry = 'Test'; | |
opt.opptyItems = 'https://www.zerionsoftware.com'; |
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
public with sharing class SlackOpportunityPublisher { | |
// Production business channel | |
// private static final String slackURL = 'https://hooks.slack.com/services/######'; | |
// Private channel for testing | |
// private static final String slackURL = 'https://hooks.slack.com/services/#####'; | |
public class Oppty { |
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
-----BEGIN RSA PRIVATE KEY----- | |
MIIEowIBAAKCAQEA0cCM/xT5c6Czor3573pXlPEFbEzk4rm/iq15eWntOWMl3Bkb | |
dZY9Zbm8TOjh0YrHFH4ZrQmREXyxVQxZNQ7zwITmwyrMyb1/ravbSpuj9HIpY4hn | |
5sregUJZUtWTSvtlXSSKa60bva5qG8MHi+hK7qWayJwfriDung+T9jss6k8ANmin | |
2BPjpjTlMbbJbRyr+27XYov3nD9U1KYeBnGgyj8aplb/1e75Iuk7oCwVm+kTsPKI | |
/ZeATf/kfS93tQrw0/gozP4iVubyKBVG05BzerFcb3QUzLSo3LIJ/8VYuGHnz6y+ | |
J6xy02EOhzJMPLUt3GQo7yUDOPls/W2tCBUebwIDAQABAoIBADmS9eDKnBI+CTDh | |
nqo6VbH/WnK4xJbrT4U8Sryl88Stz2WTyrLDE4VJr0MZJWsEAdNBLcEOgDBhnrdu | |
lUn4GbY9hK4LoHy7tEEyjBX1lNJzR6MXfRWfl+W5FZWkJDMPwGoJrqkRsiylpGCM | |
bxTbJT5OXKc2G4gLaBQgyIdtBM4nc7F/TraswmuU940NsVSKBIpeqsgh4jeV6p8T |
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 getStreetNumber(lat, lng) { | |
var json = getRGeocodeJSON(lat, lng); | |
var obj = JSON.parse(json); | |
try { return obj.results[0].address_components[0].short_name; } | |
catch(e) { return ''; } | |
} | |
function getStreetName(lat, lng) { | |
var json = getRGeocodeJSON(lat, lng); |
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
import jwt, base64, os, uuid, sys, urllib, urllib2, json, collections, traceback, time, datetime | |
from datetime import timedelta | |
############################################################################# | |
get an jwt then make call to get access token ## | |
############################################################################# | |
def GetAccessToken(iFormUrl, iFormClientKey, iFormClientSecret): | |
expTime = datetime.datetime.utcnow() + datetime.timedelta(seconds=600) | |
nowTime = datetime.datetime.utcnow() | |
payload = {"iss": iFormClientKey, |
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 getCurrentWeather(lat, lng) { | |
var json = getCurrentConditions(lat, lng); | |
var obj = JSON.parse(json); | |
var currentWeather = obj.currentobservation.Weather; | |
var tempF = obj.currentobservation.Temp; | |
var currentWindSpeed = obj.currentobservation.Winds; | |
var currentWindDirection = obj.currentobservation.Windd; | |
var currentWindGust = obj.currentobservation.Gust; | |
var currentHumidity = obj.currentobservation.Relh; |
NewerOlder