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
# requirement: erlang, git | |
ELIXIR_VERSION="1.6.3" | |
sudo apt-get update && sudo apt-get install -y git && \ | |
rm -rf /tmp/code/elixir/${ELIXIR_VERSION} && mkdir -p /tmp/code/elixir/${ELIXIR_VERSION} && cd /tmp/code/elixir/${ELIXIR_VERSION} && \ | |
git clone -b "v${ELIXIR_VERSION}" --single-branch --depth 1 https://github.com/elixir-lang/elixir.git . && \ | |
make clean test && \ | |
sudo make install && \ | |
cd && rm -rf /tmp/code/elixir && \ | |
echo "Check your elixir version by typing 'iex --version'" |
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
rm /tmp/haste-* /tmp/flow /tmp/metro-* /tmp/socketcluster/ -rf && watchman watch-del-all | |
yarn start -- --reset-cache |
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 | |
#size magnitude | |
sizes=( "" "K" "M" ) | |
for magnitude in "${sizes[@]}"; do | |
for size in `seq 1 5 51`; do | |
echo "Generating ${size}${magnitude}" | |
head -c ${size}${magnitude} </dev/urandom >file-${size}${magnitude}.bin |
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/sh | |
# Detected container limits | |
# If found these are exposed as the following environment variables: | |
# | |
# - CONTAINER_MAX_MEMORY | |
# - CONTAINER_CORE_LIMIT | |
# | |
# This script is meant to be sourced. |
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
# update/crete file on location /etc/dhcp/dhclient.conf | |
# replace 127.0.0.1 with your dns to prepend with | |
prepend domain-name-servers 127.0.0.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
yum install wget | |
wget https://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.13.1-1.el7.centos.x86_64.rpm | |
wget https://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm | |
#nice site with pckgs: https://pkgs.org/ | |
#package for docker-engine-selinux | |
yum install -y policycoreutils-python | |
rpm -i docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm |
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 android.database.Cursor; | |
import android.support.annotation.NonNull; | |
import com.raizlabs.android.dbflow.runtime.DBTransactionInfo; | |
import com.raizlabs.android.dbflow.runtime.TransactionManager; | |
import com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction; | |
import com.raizlabs.android.dbflow.runtime.transaction.QueryTransaction; | |
import com.raizlabs.android.dbflow.runtime.transaction.TransactionListener; | |
import com.raizlabs.android.dbflow.sql.builder.ConditionQueryBuilder; | |
import com.raizlabs.android.dbflow.sql.language.Delete; |
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 | |
openssl genrsa -des3 -out ca.key 4096 && \ | |
echo "CA key generated, file ca.key. Now retype password to create cert" && \ | |
openssl req -new -x509 -days 730 -key ca.key -out ca.crt && \ | |
echo "CA cert generated, file: ca.crt" |
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
git config --global url."https://".insteadOf git:// |
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 | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
cat <<_EOF_ | sudo tee /etc/profile.d/bash_unlimited_history.sh |
NewerOlder