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
require 'Telstra_Messaging' | |
api_instance = Telstra_Messaging::AuthenticationApi.new | |
client_id = 'Secret' # String | | |
client_secret = 'key' # String | | |
grant_type = 'client_credentials' # String | | |
result = api_instance.auth_token(client_id, client_secret, grant_type) |
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 | |
require_once(__DIR__ . '/vendor/autoload.php'); | |
require_once(__DIR__ . '/inc.php'); | |
require("phpMQTT.php"); | |
$server = "iot.broker.com"; | |
$port = 1883; | |
$username = ""; | |
$password = ""; |
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
/**************************************** | |
* Include Libraries | |
****************************************/ | |
#include <Adafruit_NeoPixel.h> | |
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#define PIN 25 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800); |
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
server | |
{ | |
listen 443 http2 ssl; | |
listen [::]:443 http2 ssl; | |
server_name [domain url in here]; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; | |
proxy_cookie_domain ~(?P<secure_domain>([-0-9a-z]+\.)?[-0-9a-z]+\.[a-z]+)$ "$secure_domain; secure"; | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1 TLSv1.3; |
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
require_once(__DIR__ . '/vendor/autoload.php'); | |
$apiInstance = new Telstra_Messaging\Api\AuthenticationApi( | |
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. | |
// This is optional, `GuzzleHttp\Client` will be used as default. | |
new GuzzleHttp\Client() | |
); | |
$client_id = ""; // string | | |
$client_secret = ""; // string | | |
$grant_type = "client_credentials"; // string | |
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 requests | |
from var_dump import var_dump | |
url = "https://tapi.telstra.com/v2/messages/sms" | |
payload = {'to': '000000000000', | |
'body': 'Hello World', | |
'from': '000000000000', | |
'validity': 1, | |
'scheduledDelivery': 60, |
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 | |
apt-get -y update | |
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev | |
wget -c https://openresty.org/download/openresty-1.9.15.1.tar.gz | |
tar zxvf openresty-1.9.15.1.tar.gz | |
cd openresty-1.9.15.1 | |
./configure \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ |
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
<? | |
require 'braintree.php'; | |
Braintree_Configuration::environment('sandbox'); | |
Braintree_Configuration::merchantId(''); | |
Braintree_Configuration::publicKey(''); | |
Braintree_Configuration::privateKey(''); | |
$now = new Datetime(); |