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
private static boolean safeEquals(Integer first, Integer second) { | |
return (first == null && second == null) || (first != null && first.equals(second)); | |
} | |
private static boolean safeContains(String str, String substr) { | |
return str != null && str.contains(substr); | |
} | |
private static <K> List<K> safe(List<K> list) { | |
return list != null ? list : Collections.EMPTY_LIST; |
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 | |
# Runs whatever bash commands you enter as parameters from each child directory. | |
CYAN=$'\e[0;36m' | |
RED=$'\e[31m' | |
NO_COLOR=$'\e[0m' | |
CLEAR=$'\e[K' | |
INVERTED=$'\e[7m' | |
UNINVERTED=$'\e[27m' |
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 | |
# This script is for git-svn, just a quick way to copy ignores from svn repo to local git repo. | |
# Also appends intellij specific files to ignore since I'm the only one on my team that uses intellij. | |
GREEN='\033[0;36m' | |
if [ -e ".git" ]; then | |
printf "${GREEN}Copying ignore file from Subversion..\n" | |
git svn show-ignore > .git/info/exclude | |
wait | |
printf "Adding intellij specific files to ignore..\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
# Find all files installed with a package e.g. tilda | |
dpkg -L tilda | |
# Get the size of a file | |
du -sh file_path | |
# Get the summary of disk usage of currect directory, human readable, with total, sorted by size | |
du -shc * | sort -h | |
# Show more context in grep |
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 | |
GREEN='\033[0;36m' | |
NC='\033[0m' # No Color | |
printf "Running git svn fetch on all directories..\n" | |
for d in */ ; do | |
cd "$d" | |
if [ -e ".git" ]; then | |
printf "${GREEN}$d${NC}\n" | |
git svn fetch | |
wait |
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
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
; DEVELOPER OPTIONS | |
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
;------------------------------------ | |
[Rainmeter] | |
Author=T-Skins | Tanjil Ahmed | |
ContextTitle="Stepris Config" | |
ContextAction=["#@#\Variables\config.exe"] |
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 | |
set -o errexit | |
if [ $# -eq 0 ]; then | |
echo "No directories specified. Exiting." | |
exit | |
fi | |
# make sure we're at the root of git repo | |
if [ ! -d .git ]; then |
NewerOlder