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
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
#!/bin/bash | |
JDK_UPDATE_VERSION=144 | |
JDK_BUILD_VERSION=b01 | |
JDK_HASH=090f390dda5b47b9b721c7dfaa008135 | |
echo "installing Oracle jdk1.8.0_${JDK_UPDATE_VERSION}..." | |
wget -N --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u$JDK_UPDATE_VERSION-$JDK_BUILD_VERSION/$JDK_HASH/jdk-8u$JDK_UPDATE_VERSION-linux-x64.tar.gz | |
sudo mkdir -p /opt/jdk | |
sudo tar -zxf jdk-8u${JDK_UPDATE_VERSION}-linux-x64.tar.gz -C /opt/jdk | |
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_${JDK_UPDATE_VERSION}/bin/java 100 |
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
# Ansible EC2 external inventory script settings | |
# | |
[ec2] | |
# to talk to a private eucalyptus instance uncomment these lines | |
# and edit edit eucalyptus_host to be the host name of your cloud controller | |
#eucalyptus = True | |
#eucalyptus_host = clc.cloud.domain.org |
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
# installs to /opt/gradle | |
# existing versions are not overwritten/deleted | |
# seamless upgrades/downgrades | |
# $GRADLE_HOME points to latest *installed* (not released) | |
gradle_version=2.9 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle | |
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest | |
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh | |
. /etc/profile.d/gradle.sh |
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 |
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
# do not rely on specific architecture | |
BuildArch: noarch | |
# suppress automatic detection of requirements | |
AutoReqProv: no |
NewerOlder