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 / 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);
@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 / 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-copy-new-jitsi-link.js
Last active September 13, 2022 21:58
Script Kit - New Jitsi Meeting URL
@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-todoist.ts
Created September 14, 2022 22:20
Script Kit - Todoist
// Name: Todoist
// Description: Create and browse your Todoist Tasks
// Author: Vogelino
// Twitter: @soyvogelino
import "@johnlindquist/kit";
const { TodoistApi } = await npm("@doist/todoist-api-typescript");
const { formatRelative } = await npm("date-fns");
interface ProjectType {
@vogelino
vogelino / scriptkit-unsplash.js
Last active September 15, 2022 15:10
Script Kit – Unsplash
// Name: Unsplash
// Description: Search unsplash for the perfect image to download
// Author: Vogelino
// Twitter: @soyvogelino
import "@johnlindquist/kit";
const { createApi } = await npm("unsplash-js");
const accessKey = await env(
"UNSPLASH_ACCESS_KEY",
@vogelino
vogelino / scriptkit-get-tabler-icon.js
Created September 15, 2022 21:58
Script Kit - Tabler Icon
// Name: Get Tabler Icons
// Description: Copies a Tabler Icon from tabler open-sourced repository.
// Author: Lucas Vogel
// Twitter: @soyvogelino
import "@johnlindquist/kit";
const iconsPath = "https://tabler-icons.io/icons.json";
let files = [];
@vogelino
vogelino / scriptkit-change-text-case.js
Created September 16, 2022 07:53
Script Kit - Change Text Case
// Name: Change case of selected text
// Description: Choose a transformation method (eg. camelCase) to transform the selected text in-place (Or some text input)
// Author: Vogelino
// Twitter: @soyvogelino
import "@johnlindquist/kit";
const changeCase = await npm("change-case");
let text = await getSelectedText();
@vogelino
vogelino / scriptkit-github-repos.ts
Created September 16, 2022 16:42
Script Kit - GitHub Repos
// Name: GitHub Repos
// Description: List GitHub repositories and perform actions on them
// Author: Vogelino
// Twitter: @soyvogelino
import "@johnlindquist/kit";
const { Octokit } = await npm("octokit");
const shodwon = await npm("showdown");
const converter = new shodwon.Converter({