Skip to content

Instantly share code, notes, and snippets.

View MateuszKubuszok's full-sized avatar
🏠
Vacationing from OSS at an actual work

Mateusz Kubuszok MateuszKubuszok

🏠
Vacationing from OSS at an actual work
View GitHub Profile
@javierfs89
javierfs89 / Strip.scala
Created June 9, 2014 11:27
StripMargin string interpolator macro
/**
* 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 July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/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