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
JSONAPIObject: | |
description: Includes the current JSON:API version for this specification as well as optional meta information | |
type: object | |
required: | |
- version | |
properties: | |
version: | |
type: string | |
default: '1.0' | |
example: '1.0' |
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
javascript:(function()%7B(function(params)%20%7Bsleep%20%3D%20async%20(timeout%20%3D%201000)%20%3D%3Enew%20Promise(resolve%20%3D%3E%20setTimeout(resolve%2C%20timeout))%3BfindDeletable%20%3D%20()%20%3D%3E%5B...document.querySelectorAll(%22.branch-actions%22)%5D.filter(el%20%3D%3Eel.querySelector(%22.State--red%22)%20%7C%7C%20el.querySelector(%22.State--purple%22)).map(el%20%3D%3E%20el.querySelector(%22form%20button%22))%3BclickDelete%20%3D%20async%20deletable%20%3D%3E%20%7Bfor%20(button%20of%20deletable)%20%7Bbutton.click()%3Bawait%20sleep()%3B%7D%7D%3BnextPage%20%3D%20async%20()%20%3D%3E%20%7Bawait%20sleep(2000)%3Bnext%20%3D%20%5B...document.querySelectorAll(%22.pagination%20a%22)%5D.filter(el%20%3D%3E%20%2FNext%2F.test(el.innerText))%5B0%5D%3Bif%20(!next)%20throw%20new%20Error(%22done%3F%22)%3Bnext.click()%3B%7D%3Bgo%20%3D%20async%20()%20%3D%3E%20%7Bawait%20clickDelete(findDeletable())%3Bawait%20nextPage()%3B%7D%3Bgo()%3B%7D)()%7D)() |
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 | |
tmp_image_file="$TMPDIR.imgpbcopy.png" | |
curl $1 > $tmp_image_file | |
osascript -e "set the clipboard to (read (POSIX file \"$tmp_image_file\") as JPEG picture)" |
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
count = () => $('.fields-row').length; | |
isEmpty = () => $('h1')[0].innerText == 'Nothing found'; | |
tick = () => { | |
if (isEmpty()) { | |
found = 0; | |
} else if (found < count()) { | |
alert('Found new stuff!'); |
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
const _sharedBaseUrl = 'http://57b20fb546b57d1100a3c405.mockapi.io/api'; | |
const subscribeHook = (z, bundle) => { | |
// `z.console.log()` is similar to `console.log()`. | |
z.console.log('console says hello world!'); | |
z.console.log(bundle); | |
// bundle.targetUrl has the Hook URL this app should call when a recipe is created. | |
const data = { | |
url: bundle.targetUrl, |
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 | |
CONTAINER_ID=`docker ps -f status=running -f name=web_run -n 1 | head -n 2 | tail -n 1 | cut -d' ' -f1` | |
if [[ "${CONTAINER_ID:0:9}" = "CONTAINER" ]]; then | |
echo "No container exists, creating it (hit enter after a sec to bring up terminal)..." | |
docker-compose run --service-ports web /bin/bash | |
exit 0 | |
fi |
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
const get = (url, key) => { | |
const a = document.createElement('a'); | |
a.href = url; | |
if (!a.search) return null; | |
const regex = new RegExp(key, 'i'); | |
return a.search.split('&').filter(regex.test, regex)[0].split('=')[1]; | |
} | |
const max = get(location.href, 'max'); | |
if (max) { |
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
SHEET_ID = '...'; | |
LINKS_UPDATE_WEBHOOK_URL = '...'; | |
function doGet(request) { | |
if (!request) request = { parameter: {secret: null} }; | |
var set = {}; | |
SpreadsheetApp.openById(SHEET_ID).getSheets().forEach(function(sheet){ | |
var name = sheet.getName().toLowerCase(); |
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
var pagesEnroute = {}; | |
var keensEnroute = {}; | |
var uid = 0; | |
USERS.forEach(function(user){ | |
var handleEvents = function(err, events){ | |
if (err) throw new Error(err); |
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
var Animal = function(name){ | |
this.name = name; | |
}; | |
Animal.prototype.speak = function(){ | |
console.log(this.name); | |
}; | |
var Dog = function(name){ | |
Animal.call(this, name); |
NewerOlder