Skip to content

Instantly share code, notes, and snippets.

View shiftgeist's full-sized avatar
🪄
Conjuring CSS

Felix Hungenberg shiftgeist

🪄
Conjuring CSS
  • 19:12 (UTC +02:00)
View GitHub Profile
@shiftgeist
shiftgeist / add-likes-to-playlist.js
Last active March 14, 2024 12:13
Soundcloud: Add all liked songs to playlist
// 1. Start on https://soundcloud.com/you/likes
// 2. Scroll all the way to the bottom (may only add 300 items at a time because of soundcloud api)
// (playlists are limited to 500 songs)
playlistName = 'Likes' // <== your playlist
list = Array.from(document.querySelectorAll('.badgeList__item .sc-button-more'))
console.log('Found', list.length, 'liked songs')
@shiftgeist
shiftgeist / timeout-promise.js
Last active March 6, 2024 11:21
setTimeout Promise
await new Promise(resolve => setTimeout(resolve, 1000));
@shiftgeist
shiftgeist / enum-const.ts
Created January 23, 2024 14:34
Enum with Const + Type
const Permission = {
Read: 'r',
Write: 'w',
Execute: 'x'
} as const;
type Permission = typeof Permission[keyof typeof Permission];
@shiftgeist
shiftgeist / vite.config.ts
Created January 9, 2024 12:21
Vite: Fetch package.json version
const fetchVersion = () => {
return {
name: 'html-transform',
transformIndexHtml(html) {
return html.replace(
/__APP_VERSION__/,
`v${process.env.npm_package_version}`
)
}
}
/**
* If a object has a property with Array<{ [key]: val }> and you want to make the array object values partial
*/
export type PartialByArray<T, K extends keyof T> = Exclude<T, K> & {
[key in K]: Array<{ [B in keyof T[K]]: Partial<T[K][B]> }>
}
@shiftgeist
shiftgeist / pog-star-repo.csv
Last active November 6, 2021 15:42
Collection of the best repositories that I stared (definitely not because I forget their names)
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 4 columns, instead of 3. in line 8.
Name,Description,Link,Quick Start
barrier,Open-source KVM software,https://github.com/debauchee/barrier,apt install barrier
based.cooking,A simple culinary website,https://github.com/LukeSmithxyz/based.cooking,based.cooking
Bundlephobia,Find the cost of adding a npm package to your bundle,https://github.com/pastelsky/bundlephobia,https://bundlephobia.com
catt,Cast All The Things allows you to send videos from many online sources to your Chromecast,https://github.com/skorokithakis/catt,python3 -m pip install catt
clean-code-javascript,🛁 Clean Code concepts adapted for JavaScript,https://github.com/ryanmcdermott/clean-code-javascript,https://github.com/ryanmcdermott/clean-code-javascript#introduction
entr,Run arbitrary commands when files change,https://github.com/eradman/entr,curl https://eradman.com/entrproject/code/entr-5.0.tar.gz -o entr-5.0
flameshot,Powerful yet simple to use screenshot software 🖥️ 📸,https://github.com/flameshot-org/flameshot,apt install flameshot
fzf,🌸 A command-line fuzzy finder,https:/
@shiftgeist
shiftgeist / release.yml
Created March 10, 2021 13:46
Release to npm and github registry on tag push
name: Release
on:
push:
tags:
- '*'
jobs:
release:
name: Release
@shiftgeist
shiftgeist / gnome-extensions.md
Last active July 27, 2020 08:50
Gnome Extensions to create a more Windows experience.
@shiftgeist
shiftgeist / postcss.config.js
Created July 27, 2020 08:08
add postcss plugin in production only
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
...(process.env.NODE_ENV === 'production' ? [purgecss] : [])
]
};
{
"compilerOptions": {
"paths": {
"@/*": [
"src/*"
]
}
}
}