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
{ | |
"openapi": "3.0.2", | |
"info": { | |
"title": "MyApi", | |
"version": "1.0", | |
"description": "A sample api" | |
}, | |
"paths": { | |
"/example": { | |
"get": { |
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
#!/bin/bash | |
export AWS_ACCESS_KEY_ID="<Access Key ID>" | |
export AWS_SECRET_ACCESS_KEY="<Secret Access Key>" | |
export AWS_DEFAULT_REGION="ap-southeast-2" # I'm in Sydney! It's worth making this close... | |
export STREAM_NAME="skyline-dash-front" | |
/home/pi/dev/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis_video_gstreamer_sample_app $STREAM_NAME |
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
#!/bin/bash | |
# Download a chunk of kinesis stream! | |
# Prerequisites: awscli, ffmpeg, jq | |
# Usage: ./download-kinesis-video-stream.sh --start "2020-03-08T13:53:00+11:00" --end "2020-03-08T13:54:00+11:00" --output output.mp4 | |
# Change these to whatever you use... | |
STREAM_NAME="skyline-dash-front" | |
AWS_PROFILE="skyline" | |
AWS_REGION="ap-southeast-2" |
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
#!/bin/bash | |
USAGE=$'Usage: | |
./libcurl_builder <options> | |
Required: | |
-c <curl_directory> The top level curl directory | |
-s <openssl_directory> The top level openssl directory | |
-n <ndk_directory> The top level ndk directory |
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
#### INSTRUCTIONS #### | |
# | |
# 1) Add the contents of this file to your .bash_profile in your home directory | |
# 2) Save .emojis in your home directory | |
# 3) Profit | |
#### EMOJI PROMPT ########################################## | |
# This picks a random emoji from your '.emojis' file! | |
ORIGINAL_IFS=$IFS | |
IFS=$'\n' read -d '' -r -a emojis < ~/.emojis |
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
require 'nokogiri' | |
require 'open-uri' | |
# Get all the airports from wikipedia! | |
def get_airport_info_from_wikipedia() | |
airport_info = [] | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").each do |letter| | |
doc = Nokogiri::HTML(open("https://en.wikipedia.org/wiki/List_of_airports_by_IATA_code:_#{letter}")) | |
iata_table = doc.xpath("//table")[0] | |
rows = iata_table.xpath("//tr") |
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
var backup = function(options) { | |
$.ajax({ | |
url: "https://api-gb.tugoapp.com/users/me/history?from_version=0&page_size=" + options.numTexts + "&page_number=1&with_source=" + options.theirNumber + "," + options.myNumber + "&with_destination=" + options.theirNumber + "," + options.myNumber, | |
headers: { | |
"X-External-Transaction-Id": "blahblah123", | |
"Authorization": "Bearer " + options.token, | |
"X-User-Version": "1.2.0", | |
"X-Country-Code": "GB", | |
"X-User-Msisdn": options.myNumber, | |
"Accept-Language": "en-GB,en-US;q=0.8,en;q=0.6", |
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
require "net/http" | |
require "uri" | |
require "net/smtp" | |
product = "C4 Extreme" | |
url = "http://monstersupplements.com/store/p/5548/1/Cellucor-C4-Extreme-60-servings.html" | |
flavours = ["Fruit Punch", "Orange", "Blue Raspberry", "Green Apple", "Watermelon"] | |
wantedFlavours = ["Orange", "Watermelon"] | |
emails = ["[email protected]", "[email protected]"] |