Skip to content

Instantly share code, notes, and snippets.

Avatar
🚨
Git Inspector

Andrew Luca iamandrewluca

🚨
Git Inspector
View GitHub Profile
@iamandrewluca
iamandrewluca / script.js
Created February 10, 2023 13:48
Unbookmark Mastodon bookmarks
View script.js
let interval = setInterval(() => {
let bookmark = document.querySelector('.bookmark-icon')
if (bookmark) bookmark.click()
else clearInterval(interval)
}, 1000)
@iamandrewluca
iamandrewluca / youtube-dl.md
Last active February 3, 2023 08:57
YouTube DL Commands
View youtube-dl.md

Download iOS ringtones

youtube-dl -x --audio-format m4a --audio-quality 0 https://...
mv *.m4a *.m4r
@iamandrewluca
iamandrewluca / !CURS.md
Last active February 3, 2023 12:25
curs.md google function
View !CURS.md
View App.vue
<script setup lang="ts">
import { shallowRef } from "vue";
import Recursive from "./components/Recursive.vue";
import { MyType } from "./my-type";
const allData = shallowRef<MyType[]>([
{
title: "Parent 1",
items: [
{
@iamandrewluca
iamandrewluca / README.md
Created September 30, 2022 11:02
Change video speed
View README.md

Audio Speed increases when bigger then 1
Video Speed increases when lower then 1

Audio Speed = 1 / Video Speed

View quiz-totals
#!/usr/bin/env node
/**
* Makes quiz average from a bunch of Thinkific Quiz CSV files
*
* Prerequirements node and npm installed
* Drop this file in a folder only with Quiz CSVs exported from Thinkific
* Make this file executable by running `chmod +x quiz-totals`
* Install `csv` dependency by running `npm install csv`
* Execute it by giving output filename as argument
View resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"version": "1.0.0",
"lastModified": "2022-04-23",
"canonical": "https://raw.githubusercontent.com/iamandrewluca/jsonresume/main/resume.json"
},
"basics": {
"name": "Andrew Luca",
"email": "iamandrewluca@gmail.com",
View parse-strange-unit.js
let unit = `5" x 5' x 1-3/16"`
unit.split('x')
.map((v) => v.trim())
.map((v) => ({ value: removeUnit(v), unit: getUnit(v) }))
.map(({ unit, value }) => ({ unit, value: value.split('-') }))
.map(({ unit, value: [whole, fraction] }) => ({ unit, whole, fraction: splitFraction(fraction) }))
.map(({ unit, whole, fraction }) => ({ unit, value: parseInt(whole) + divideTuple(fraction) }))
.map(o => convertToInch(o))
.reduce((product, o) => product * o.value, 1)
@iamandrewluca
iamandrewluca / README.md
Created February 22, 2022 18:16
Join mp4 files
View README.md

Generate a file with all file names

for f in *.mp4; do echo file \'$f\' >> fileList.txt; done;

Merge all files together

ffmpeg -f concat -safe 0 -i fileList.txt -c copy output.mp4
@iamandrewluca
iamandrewluca / git-reset-author.sh
Last active December 1, 2021 15:52
Change commit author using a rebase
View git-reset-author.sh
git rebase -x "git commit --amend --reset-author --no-edit" main