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
#!/usr/bin/env python | |
# vim: ts=4 sw=4 noet fileencoding=utf-8: | |
"""Boiler-plate Python 2.7 quick CLI project file""" | |
__author__ = 'pestilence669' | |
from argparse import ArgumentParser | |
import sys | |
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
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
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
#!/usr/bin/sh | |
# vim: set ts=4 sw=4 noet: | |
# I can't wait for this to be a command-line flag | |
for i in 2 3; do | |
echo "Updating Python $i.x..." | |
pip$i freeze --local | grep -v '^\-e' | cut -d= -f1 | xargs pip$i install -U | |
done |
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 |
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
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 | |
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
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
# 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
#!/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 |