Skip to content

Instantly share code, notes, and snippets.

View thibmaek's full-sized avatar
🐹
Currently coding a lot in Go

Thibault Maekelbergh thibmaek

🐹
Currently coding a lot in Go
View GitHub Profile
@thibmaek
thibmaek / deploy-expo-ios.sh
Created June 21, 2018 21:43
CD for Expo RN applications
#! /usr/bin/env bash
set -e
# This is based on the expo blogpost:
# https://blog.expo.io/automating-standalone-expo-app-builds-and-deployments-with-fastlane-exp-and-exptool-9b2f5ad0a2cd
# Publish `production` release to Expo
function publish_expo() {
# Log into Expo when running in CI
# Locally you should already be logged in
@thibmaek
thibmaek / npm.js
Created August 2, 2018 15:00
NPM on the web
const npm = pkg => import(`https://unpkg.com/${pkg}?module`);
(async () => {
const pf = await npm('pure-fun');
})();
@thibmaek
thibmaek / vrt_loop_download_season.sh
Last active March 11, 2019 09:57
Download season from VRTNU
# Example to download every episode from VRTNU (A-Z Luc Tuymans)
function main() {
local episodes=(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26)
for ep in "${episodes[@]}"; do
youtube-dl "https://www.vrt.be/vrtnu/a-z/van-a-tot-z--luc-tuymans/2019/van-a-tot-z--luc-tuymans-s2019a$ep/"
done
unset episodes
}
@thibmaek
thibmaek / parse.sh
Created April 10, 2019 13:02
InfluxDB: parse shell string fields
payload=""
fields=("d=2" "f=3")
for field in "${fields[@]}"; do
key=$(echo "$field" | sed 's/=.*//g')
value=$(echo $field | awk -F= '{print $2}')
echo $key
echo $value
payload="$payload $key=\"$value\""
@thibmaek
thibmaek / pod_install.sh
Created January 21, 2021 17:04
Agnostic pod install! Source this to pod install wherever in your project
#!/usr/bin/env bash
function find_podfile_dir() {
podFile=$(find "$PWD" -type f -not -path "*/node_modules/*" -name "Podfile")
if [ -f "$podFile" ]; then
echo "${podFile//Podfile/}"
else
echo "Unable to find Podfile"
exit 1