Skip to content

Instantly share code, notes, and snippets.

View vogelino's full-sized avatar
πŸ‡¨πŸ‡­
Back in Switzerland

Lucas Vogel vogelino

πŸ‡¨πŸ‡­
Back in Switzerland
View GitHub Profile
@vogelino
vogelino / scriptki-search-youtube-videos.js
Last active September 19, 2022 20:14
Script Kit - Search for YouTube Videos
// 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 =
@vogelino
vogelino / scriptkit-copy-new-jitsi-link.js
Last active September 13, 2022 21:58
Script Kit - New Jitsi Meeting URL
@vogelino
vogelino / scriptkit-nts-live.js
Last active October 11, 2022 08:36
Script Kit - NTS live Widget
// 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;
@vogelino
vogelino / scriptkit-download-youtube-video.js
Created September 13, 2022 18:11
Script Kit – Download a YouTube Video
// 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");
@vogelino
vogelino / cloneArray.js
Last active May 28, 2022 08:34
JS utility functions
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.
Antonia
Hans
Karla
Jens
Paul
Mohammed
Jalen
Witney
Anick
Guadalupe
@vogelino
vogelino / README.md
Last active April 6, 2022 22:07
React Hook: useLocalStorage

React Hook: useLocalStorage

Code by Robin Wieruch copied from his article

@vogelino
vogelino / README.md
Created April 6, 2022 15:53
React Hook: Get Scrollbar Width

React Hook: Get Scrollbar Width

Code by Robin Wieruch copied from his article

We can't make this file beautiful and searchable because it's too large.
"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
@vogelino
vogelino / githubStars.js
Last active March 27, 2022 14:21
GitHub user stars to CSV
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}"`,