Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
WFH / WTF

Mateusz Kubuszok MateuszKubuszok

🏠
WFH / WTF
View GitHub Profile
@javierfs89
javierfs89 / Strip.scala
Created Jun 9, 2014
StripMargin string interpolator macro
View Strip.scala
/**
* This interpolator can be evaluated in compile time, so you can use to generate
* constant strings (if all params are also constant)
*
* Works on Scala 2.10.2
*/
implicit class stripInterpolator(sc: StringContext) {
def strip(params: Any*) = macro stripMacro
}
@m14t
m14t / fix_github_https_repo.sh
Created Jul 5, 2012
Convert HTTPS github clones to use SSH
View fix_github_https_repo.sh
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
You can’t perform that action at this time.