Code by Robin Wieruch copied from his article
π¨π
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
// Name: Search for YouTube Videos | |
// Description: Prompts for a search string and lists all youtube videos found (with preview) | |
// Author: Vogelino | |
// Twitter: @soyvogelino | |
// Shortcut: opt y | |
import "@johnlindquist/kit"; | |
const apiKey = await env("YOUTUBE_API_KEY"); | |
const previewAudioOn = |
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
// Name: New Jitsi Meeting URL | |
// Description: Copies a random Jitsi Meeting URL to clipboard and offers to open it | |
// Author: Vogelino | |
// Twitter: @soyvogelino | |
import "@johnlindquist/kit"; | |
const { hri } = await npm("human-readable-ids"); | |
const newMeetingSlug = hri.random(); |
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
// Name: NTS Live | |
// Description: Stream NTS Live Channel 1 or 2 | |
// Author: Vogelino, extended by Josh Davenport-Smith | |
// Twitter: @soyvogelino | |
// Shortcut: | |
import "@johnlindquist/kit"; | |
const PLAYER_HEIGHT = 76; | |
const PLAYER_WIDTH = 205; |
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
// Name: Download YouTube Video | |
// Description: Download a video from a YouTube URL as .mp4 | |
// Author: Vogelino | |
// Twitter: @soyvogelino | |
import "@johnlindquist/kit"; | |
const youtubeDlExec = await npm("youtube-dl-exec"); | |
const slugify = await npm("slugify"); | |
const apiKey = await env("YOUTUBE_API_KEY"); |
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
const cloneArray = (arr) => ([...arr]) | |
// OR | |
const cloneArray = (arr) => arr.slice(0); | |
// OR | |
const cloneArray = (arr) => Array.from(arr); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
Antonia | |
Hans | |
Karla | |
Jens | |
Paul | |
Mohammed | |
Jalen | |
Witney | |
Anick | |
Guadalupe |
Code by Robin Wieruch copied from his article
We can't make this file beautiful and searchable because it's too large.
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
"Main ID","Incident ID","Incident Type","Region of Incident","Incident Date","Incident year","Reported Month","Number of Dead","Minimum Estimated Number of Missing","Total Number of Dead and Missing","Number of Survivors","Number of Females","Number of Males","Number of Children","Region of Origin","Cause of Death","Migration route","Location of death","Information Source",Coordinates,"UNSD Geographical Grouping","Article title","Source Quality",URL | |
2014.MMP00001,2014.MMP00001,Incident,"North America",2014-01-06,2014,January,1,,1,,,1,,"Central America","Mixed or unknown","US-Mexico border crossing","Pima Country Office of the Medical Examiner jurisdiction, Arizona, USA (see coordinates for exact location)","Pima County Office of the Medical Examiner (PCOME)","POINT (-110.366453 31.650259)","Northern America",,5,http://humaneborders.info/ | |
2014.MMP00002,2014.MMP00002,Incident,"North America",2014-01-12,2014,January,1,,1,,,,,"Latin America / Caribbean (P)","Mixed or unknown","US-Mexico border crossing","Pima Cou |
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
const cleanString = (s) => s.trim(); | |
const upperCaseFirstLetter = (s) => s.charAt(0).toUpperCase() + s.slice(1); | |
const prepareTopics = (topics) => | |
topics.map((t) => cleanString(upperCaseFirstLetter(t))).join(","); | |
const createRow = ({ name, description, html_url, topics }) => | |
[ | |
`"${name}"`, |