This file contains hidden or 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
# vim: set ts=4 sw=4 noet fileencoding=utf-8: | |
# | |
# cmake -DCMAKE_BUILD_TYPE=Debug .. | |
# cmake -DCMAKE_BUILD_TYPE=Release .. | |
cmake_minimum_required(VERSION 2.8) | |
set(PACKAGE_NAME "evil") | |
set(PACKAGE_VERSION "0.0.1-dev") | |
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") |
This file contains hidden or 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
#!/bin/bash | |
# | |
# run from the project's root with the full relative path to the file | |
# to destroy from history. | |
# | |
git filter-branch --force --index-filter \ | |
"git rm --cached --ignore-unmatch $1" \ | |
--prune-empty --tag-name-filter cat -- --all |
This file contains hidden or 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
#!/bin/sh | |
exec scala "$0" "$@" | |
!# | |
// vim: set ts=2 sw=2 et fileencoding=utf-8: | |
import java.lang.reflect.Method | |
import scala.annotation.tailrec | |
import scala.language.postfixOps | |
/** |
This file contains hidden or 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
#!/bin/sh | |
exec scala "$0" "$@" | |
!# | |
// vim: set ts=2 sw=2 noet: | |
// http://alvinalexander.com/scala/how-to-handle-stdout-stderr-external-system-commands-scala | |
import sys.process._ | |
val stdout = new StringBuilder | |
val stderr = new StringBuilder |
This file contains hidden or 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
# vim: set ts=4 sw=4 noet fileencoding=utf-8: | |
# | |
# cmake -DCMAKE_BUILD_TYPE=Debug .. | |
# cmake -DCMAKE_BUILD_TYPE=Release .. | |
# | |
cmake_minimum_required(VERSION 3.5) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall") |
This file contains hidden or 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
Show hidden characters
{ | |
"cmd": [ | |
"mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make && ./main" | |
], | |
"shell": true, | |
"selector": ["source.cpp", "source.c", "source.c++"], | |
"working_dir": "${project_path}", | |
} |
This file contains hidden or 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
#!/bin/bash | |
sudo open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app |
This file contains hidden or 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
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match { | |
case null => Array() | |
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent) | |
case _ => urlses(cl.getParent) | |
} | |
val urls = urlses(getClass.getClassLoader) | |
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n") |
This file contains hidden or 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
#!/bin/bash | |
# vim: set ts=4 sw=4 noet fileencoding=utf-8: | |
fontDir=`figlet -I2` | |
if [[ $# -eq 0 ]]; then | |
echo "usage: $(basename $0) [message] -- print given message for every available font in figlet" | |
exit 0 | |
fi |
This file contains hidden or 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
#!/bin/bash | |
# vim: set ts=4 sw=4 noet: | |
# get current checked out branch | |
B=`git rev-parse --abbrev-ref HEAD` | |
if [ $? -ne 0 ]; then # problem, likely not a git repo | |
exit -1 # leave whatever error occurred alone | |
fi | |
# sync from the upstream origin |