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
function crypto(coinSymbol) { | |
var apiKey = "YOUR-API-KEY-HERE"; | |
var url = "https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=" + coinSymbol | |
var requestOptions = { | |
method: 'GET', | |
uri: 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest', | |
qs: { | |
start: 1, | |
limit: 5000, | |
convert: 'USD' |
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
import pyaudio | |
import wave | |
import datetime | |
# Settings | |
output_dir = 'path/to/destination' | |
record_secs = 600 # seconds to record | |
dev_index = 2 # device index found by p.get_device_info_by_index(ii) |
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 | |
# Send a zip backup of the /home directory via scp | |
# to Google Drive via Sean's computer & SSH. (Need port forwarding if accessing from external network) | |
# The target folder name in Google Drive. Setting to something static | |
# instead of something like $HOSTNAME in case that ever changes. | |
device_name=screenpi | |
# Name of the file |
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 | |
# This app sends the device name IP address to IFTTT webhook | |
# Run this regularly by adding to the chronos table. In Terminal: | |
# `crontab - e` | |
# Add to list. I.e. if you want to run monthly: | |
# `@monthly bash send_ip.sh` | |
# device_name=new_device |
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
import requests | |
# Account Information | |
# Webhook keys for each IFTTT account | |
key1 = 'xxxx' | |
key2 = 'xxxx' | |
allKeys = [key1, key2] | |
noOfAccounts = len(allKeys) |
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
import SwiftUI | |
struct DoublePicker: UIViewRepresentable { | |
let leftOptions: [Any] | |
@Binding var leftSelection: Int | |
let rightOptions: [Any] | |
@Binding var rightSelection: Int | |
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
// IMPORT | |
/** | |
* Imports JSON data to your spreadsheet Ex: IMPORTJSON("http://myapisite.com","city/population") | |
* @param url URL of your JSON data as string | |
* @param xpath simplified xpath as string | |
* @customfunction | |
*/ | |
function IMPORTJSON(url,xpath){ | |
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
// WARNING: This will cause issues with the Undo function. | |
function onEdit(e) { | |
// Set sheet name (it must already exist): | |
var sheetName = "Changelog" | |
// e contains: | |
// - authorized mode | |
// - range | |
// - source | |
// - user |
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
// | |
// FirebaseHelper.swift | |
// | |
// | |
// Created by Sean Li on 5/22/19. | |
// Copyright © 2019 Sean Li. All rights reserved. | |
// | |
import Foundation | |
import Firebase |
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
// | |
// AppDelegate.swift | |
// | |
// | |
// Created by Sean Li on 5/22/19. | |
// Copyright © 2019 Sean Li. All rights reserved. | |
// | |
import UIKit | |
import Firebase |