Skip to content

Instantly share code, notes, and snippets.

View RayhanHamada's full-sized avatar

hmd RayhanHamada

View GitHub Profile
#!/usr/bin/env bash
#
# bootstrap-dotfiles.sh
#
# Linux workstation bootstrap for Debian / Ubuntu / Pop!_OS
#
# Features:
# - apt bootstrap deps
# - Homebrew for userland tooling
# - Docker engine via apt
@RayhanHamada
RayhanHamada / vercel-ignore-build.sh
Created March 20, 2022 10:01
A small script for ignoring some branch build on vercel
#!/bin/bash
# from vercel blog
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
# only build on push to main, you can customize the condition
if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]]; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1
@RayhanHamada
RayhanHamada / firebase-usefull.ts
Last active September 27, 2021 09:35
Usefull codes for firebase
/**
* custom firestore converter for more simplicity and type safety
*/
type CustomFirestoreConverter<Model extends Record<string, unknown>> = Omit<
FirestoreDataConverter<Model>,
'fromFirestore'
> & {
fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData & Model>): Model;
};
@RayhanHamada
RayhanHamada / serverquicksetup.sh
Created May 8, 2021 07:25
for server quick setup
echo "adding repository"
sudo apt-add-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt update
yes | sudo apt upgrade
mkdir setups
git clone https://github.com/rayhanhamada/quickserver.git ./setups
cd setups