This file contains 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
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |
This file contains 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
yarn create next-app -- --typescript | |
cd folder/ | |
# Add tinaCMS | |
npx @tinacms/cli@latest init | |
# Add Tailwind | |
yarn add -D tailwindcss postcss autoprefixer | |
npx tailwindcss init -p |
This file contains 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
for i in *.opus; do ffmpeg -i "$i" "${i%.*}.mp3"; done | |
for i in *.m4a; do ffmpeg -i "$i" "${i%.*}.mp3"; done |
This file contains 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
sudo apt update | |
sudo apt install fuse libfuse-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++ | |
sudo snap install cmake --classic | |
git clone https://github.com/sgan81/apfs-fuse.git | |
cd apfs-fuse | |
git submodule init | |
git submodule update | |
mkdir build |
This file contains 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 isLowerCase = str => str === str.toLowerCase(); | |
const isNullOrUndefined = val => val === undefined || val === null; | |
const smoothScroll = element => | |
document.querySelector(element).scrollIntoView({ | |
behavior: 'smooth' | |
}); | |
const splitLines = str => str.split(/\r?\n/); |
This file contains 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
#!/bin/bash | |
# Curl the url, get 1-line that contains the mix id, keep only that, remove prefixes and suffixes, add the json url we need for getting the tracklist | |
url=$(curl https://8tracks.com/$1 | grep embedUrl | awk {'print $3'} | sed -e 's#content="##g' -e 's#player_v3_universal/autoplay"##g' | sed 's/$/tracks_for_international.jsonh/') | |
# Curl the url that contains tracklist | |
tracks=$(curl $url) | |
# Get number of tracks | |
count=$(echo $tracks | jq '.tracks | length - 1') | |
# For all tracks download each one | |
for i in $(seq 0 $count) | |
do |
This file contains 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
# Rails secret | |
SECRET_KEY_BASE=NEW_SECRET | |
DB_POOL=10 | |
DATABASE_URL=postgres://CHANGE_ME:CHANGE_ME123@db/CHANGE_ME_dev | |
# Puma port | |
PORT=3000 | |
# Rails outputs to console if this env exists |
This file contains 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: drone-secrets | |
type: Opaque | |
data: | |
server.secret: REPLACE-THIS-WITH-BASE64-ENCODED-VALUE |
This file contains 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
defaults: &defaults | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 | |
reconnect: true | |
development: | |
<<: *defaults | |
url: <% ENV['DATABASE_URL'] %> |
This file contains 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
###* | |
# Bootstrap Datepicker for Backbone.Forms | |
# | |
# Quick editor to create a Bootstrap style datepicker (instead of multiple of dropdowns) | |
# @see: https://github.com/eternicode/bootstrap-datepicker/ | |
# @usage: takes 5 optional schema options: format, minViewMode, autoclose, clearBtn and endDate | |
# Forked because I wanted to use only years as shown in the example below | |
schema: | |
MyDate: | |
type: "DatePicker" |
NewerOlder