This file contains 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 bash | |
# usage: | |
# cd /directory/with/git/repo | |
# clonebranch <branchname> | |
# => branch is cloned to /directory/with/git/repo/../reponame-branchname | |
git clone -b $1 file://${PWD} ${PWD}/../${PWD##*/}-$1 |
This file contains 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
/* Custom MailMate (http://freron.com) layout for Mailboxes view. Extends the installed widescreen | |
layout by adding a vertical thread arcs view at the right. Save it to | |
"~/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/widescreen_with_thread_arcs.plist" | |
and it will be available after a restart of MailMate. */ | |
{ | |
name = "Widescreen with Thread Arcs"; | |
rootViewer = | |
{ | |
viewerType = "MmSplitView"; |
This file contains 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
/** | |
* Gets the stack trace from the given throwable. | |
* | |
* @param throwable | |
* a throwable | |
* @return stack trace as string | |
*/ | |
public static String getStackTrace(Throwable throwable) { | |
final StringWriter stringWriter = new StringWriter(); | |
throwable.printStackTrace(new PrintWriter(stringWriter)); |
This file contains 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
# substitute the string '{{{name}}}' with 'johndoe' in all files (including hidden ones) recursively and in-place | |
# tested on OSX, it does not creates any strange files based on .DS_STORE | |
find . -type f -name "*.*" -print0 | LC_ALL=en_US.CP437 xargs -0 sed -i '' -e 's/{{{name}}}/johndoe/g' |
This file contains 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
import com.hazelcast.core.Hazelcast; | |
import com.hazelcast.core.HazelcastInstance; | |
import com.hazelcast.core.IMap; | |
import com.hazelcast.mapreduce.Combiner; | |
import com.hazelcast.mapreduce.CombinerFactory; | |
import com.hazelcast.mapreduce.Context; | |
import com.hazelcast.mapreduce.Job; | |
import com.hazelcast.mapreduce.JobCompletableFuture; | |
import com.hazelcast.mapreduce.JobTracker; | |
import com.hazelcast.mapreduce.KeyValueSource; |
This file contains 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
Prefix Symbol Size Example | |
yocto y 1 bit Theoretical minimum | |
zepto z 1 byte (close enough to 10 bits) Really small APL program | |
atto a 10 chars nc -l 8080 | |
femto f 1 line (roughly 100 chars) netcat piped into something else | |
pico p 10 lines tiny python service | |
nano n 100 lines small python service | |
micro μ 1000 lines typical "smallish" service | |
milli m 10,000 lines about as big as "microservices" would go these days, or a small monolithic app | |
centi c 100,000 lines decent-sized monolithic app |
This file contains 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 | |
# jdk | |
sudo su root | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz | |
tar -zxf jdk-8u73-linux-x64.tar.gz -C /opt | |
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_73/bin/java 100 | |
echo 'export JAVA_HOME=/opt/jdk1.8.0_73' >> /home/ubuntu/.bash_profile | |
rm jdk-8u73-linux-x64.tar.gz |
This file contains 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
# architecture # | |
lscpu | |
# release # | |
# RHEL, CentOS | |
cat /etc/redhat-release | |
# Ubuntu | |
cat /etc/issue | |
lsb_release -a |
This file contains 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 | |
# | |
# existing versions are not overwritten/deleted | |
# seamless upgrades/downgrades | |
# $M2_HOME points to latest *installed* (not released) | |
# config | |
mirror=http://mirror.cc.columbia.edu/pub | |
mvnversion=3.0.5 |
This file contains 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
cscript /nologo wget.js http://example.com |
OlderNewer