Skip to content

Instantly share code, notes, and snippets.

View demonar's full-sized avatar
😄
(¯`•._.•«<ÐêMøN>»•._.•´¯) -> Building mobile apps with Kotlin and Swift

Alejandro Moya demonar

😄
(¯`•._.•«<ÐêMøN>»•._.•´¯) -> Building mobile apps with Kotlin and Swift
View GitHub Profile
#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.java.installations.fromEnv=JDK_17
org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.workers.max=8
java.mainToolchainVersion=17
java.modularToolchainVersion=17
@demonar
demonar / pull-all-branches.sh
Last active August 22, 2023 15:57
This script updates all the branches, like running pull on every local branch
#!/bin/bash
cd $1
declare -a BRANCHES=(`git for-each-ref --format='%(refname:short)' refs/heads/`)
CURRENT=(`git rev-parse --abbrev-ref HEAD`)
for BRANCH in "${BRANCHES[@]}"
do
if [ "$CURRENT" = "$BRANCH" ]
then
git pull
else
@demonar
demonar / delete-orphan-branches.sh
Created August 22, 2023 15:56
This script deletes branches that doesn't exist on the remote
cd $1
declare -a BRANCHES=(`git for-each-ref --format='%(refname:short)' refs/heads/`)
CURRENT=(`git rev-parse --abbrev-ref HEAD`)
for BRANCH in "${BRANCHES[@]}"
do
EXISTS=(`git ls-remote --heads origin refs/heads/"$BRANCH" | wc -l`)
if [ "$CURRENT" != "$BRANCH" ] && [ "$EXISTS" = 0 ]
then
git branch -D "$BRANCH"
fi