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
WIDTH=35 ; for filename in * ; do created_date=$(git log --follow --format=%ad --date default $filename | tail -1); printf "%-${WIDTH}s | %s \n" "$created_date" $filename ; done | sort |
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
import scala.io.Source | |
import scala.util.matching.Regex | |
val findUnusedDeps = taskKey[Unit]("Finds unused dependencies from Dependencies.scala") | |
findUnusedDeps := { | |
// 1. Parse Dependencies.scala | |
val depsFile = (baseDirectory.value / "project" / "Dependencies.scala").getAbsolutePath | |
val depsContent = Source.fromFile(depsFile).getLines.mkString("\n") | |
val valuesRegex: Regex = """val (\w+) =""".r |
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
gh api -XPATCH "repos/raw-labs/$REPO_NAME" -f default_branch="$(git symbolic-ref --short HEAD)" > /dev/null && gh workflow run $WORKFLOW_FULL_NAME && gh api -XPATCH "repos/raw-labs/$REPO_NAME" -f default_branch="$REPO_DEFAULT_BRANCH" > /dev/null |
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
export INITIAL_DEFAULT_BRANCH=${INITIAL_DEFAULT_BRANCH:-master} | |
export WORKFLOW_YAML=<workflow_yaml> | |
export ORG_REPO=<repo> # example : export REPO="raw-labs/raw" | |
gh api -XPATCH "${ORG_REPO}" -f default_branch="$(git symbolic-ref --short HEAD)" > dev/null \ | |
&& gh workflow run ${WORKFLOW_YAML} \ | |
&& gh api -XPATCH "${ORG_REPO}" -f default_branch="${INITIAL_DEFAULT_BRANCH}" > dev/null |
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 SNAPSHOT in $(tmutil listlocalsnapshots / | egrep '[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}' -o | tail -r); do tmutil deletelocalsnapshots $SNAPSHOT; 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
git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; 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
function onEdit() { | |
var s = SpreadsheetApp.getActiveSheet(); // equivalent VB -> Worksheet_SelectionChange | |
var r = s.getActiveCell(); | |
// on fait la meme chose pour la colonne C (index:3) et F (index:5) donc on va tout faire d'un coup | |
if (r.getColumn() == 3 || r.getColumn() == 5) { | |
var nextRCell = r.offset(0, 1); // permet d'aller chercher la cell tout de suite a droite | |
if (nextRCell.getValue() === '') { | |
var thetime = new Date(); | |
// quand on instancie un temps on a besoin d'une zone horaire de référence | |
// ici on aura bien l'heure de Paris mais seulement parce-que je suis allé |