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
For cells: | |
C3: First Name 1 | |
D3: Last Name 1 | |
E3: First Name 2 | |
F3: Last Name 2 | |
H3: Mailing Address 1 | |
I3: Mailing Address 2 (Optional) | |
J3: City | |
K3: State | |
(L3: Country unused) |
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
//Run in console on a page with jQuery. (Most web pages) | |
jQuery.getJSON('https://www.wired.com/wp-json/wp/v2/posts/', function(response){console.log(response[0].title, response[0].content);}) | |
//Here's a version that doesn't need jQuery: | |
xhr = new XMLHttpRequest; | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4 && xhr.status == 200) { | |
response = JSON.parse(xhr.responseText); | |
console.log(response[0].title, response[0].content); |
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
# -*- coding: utf-8 -*- | |
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Amazon Software License (the "License"). You may not use this file except in | |
# compliance with the License. A copy of the License is located at | |
# | |
# http://aws.amazon.com/asl/ | |
# | |
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, |
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
//replace {myport} with any port number and {mytoken} with any URL-friendly string. | |
var request = require('request'); | |
const express = require('express') | |
const app = express() | |
app.get('/', (req, res) => { | |
if(req.query.token != '{mytoken}') | |
{ | |
res.send('Invalid Token'); | |
return; |
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
/* | |
Arduino Yún Bridge example | |
This example for the YunShield/Yún shows how | |
to use the Bridge library to access the digital and | |
analog pins on the board through REST calls. | |
It demonstrates how you can create your own API when | |
using REST style calls through the browser. | |
Possible commands created in this shetch: |
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
//Paste this in console (in another window) to auto-scroll a website, useful for video capturing. | |
var i = 0;setInterval(function(){window.scrollTo(0, i);i = i+ 2;}, 5); |
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 | |
if system_profiler SPAudioDataType | grep --quiet Headphones; then | |
echo plugged in | |
else | |
echo not plugged in | |
fi |
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 | |
#for OS X or linux | |
#place this file in /usr/local/bin/youtube-dl-mp4 | |
#and chmod +x /usr/local/bin/youtube-dl-mp4 | |
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' $1 |
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
//Copies the Artist, Track and URL of a playlist to the clipboard in JSON format | |
//Run in console on a soundcloud page with a playlist: | |
copy([...document.querySelectorAll('.trackItem__content')].map(ele => {return ({'artist' : ele.querySelectorAll('a')[0].innerHTML, 'track' : ele.querySelectorAll('a')[1].innerHTML, 'url' : ele.querySelectorAll('a')[1].href})})) | |
//or log it: | |
[...document.querySelectorAll('.trackItem__content')].map(ele => {return ({'artist' : ele.querySelectorAll('a')[0].innerHTML, 'track' : ele.querySelectorAll('a')[1].innerHTML, 'url' : ele.querySelectorAll('a')[1].href})}) | |
//Example output of my 2019 playlist: | |
/* | |
[ | |
{ | |
"artist": "JUST A GENT", |
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 | |
#convert to 1080 at 29.97fps | |
#useful for screen capture videos with odd aspect ratios and framerates | |
#modified from https://superuser.com/questions/891145/ffmpeg-upscale-and-letterbox-a-video | |
ffmpeg -i input.mov -vf "scale=(iw*sar)*min(1920/(iw*sar)\,1080/ih):ih*min(1920/(iw*sar)\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2, fps=fps=29.97" output.mp4 |