Skip to content

Instantly share code, notes, and snippets.

View LiberQuack's full-sized avatar

LiberQuack LiberQuack

  • Brazil
View GitHub Profile
#FORCE MIC VOLUME
cat <<'EOF' >> ~/.bashrc
### Want to see if linux is gonna change mic volume!!!
export MICVOLUME=35
export MICCALC=$(bc <<< "scale=2; 65535 * ($MICVOLUME / 100)" | grep -oP '^\d+')
while sleep 0.25; do
export MICNAME=$(pacmd list-sources | grep -zoP '\*.*\n.*name.*<(.+)>' | grep -zoP '<.*>' | grep -UzoP '[^<>]' | tr -d '\n')
pacmd set-source-volume $MICNAME $MICCALC
done
EOF
#IMPORTANT
sudo apt update &&
sudo apt install -y software-properties-common curl wget pavucontrol #pavucontrol is for audio configs
#Themes and Tweak (Ubuntu)
sudo add-apt-repository ppa:numix/ppa
sudo apt update
sudo apt install -y numix-gtk-theme numix-icon-theme-circle
sudo apt install -y unity-tweak-tool gnome-tweak-tool
SWAP_SIZE=2G
# See more: http://goo.gl/jN3NFO
sudo fallocate -l $SWAP_SIZE /swapfile
sudo chown root:root /swapfile
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee --append /etc/fstab
mkdir ~/internet
while true; do
ping -w1 -W1 youtube.com |& while read pong; do
echo "$(date +%x.%X) >>> $pong" | grep -E "rtt|100%|unknown" >> ~/internet/$(date +%x).txt
done
done
apt-get install -y tightvncserver
export USER=`whoami`
vncserver $DISPLAY -geometry 1024x768 -depth 24
tightvncserver
git clone https://MartinsThiago@bitbucket.org/MartinsThiago/rangs-client.git &&
cd rangs-client &&
git checkout develop &&
bower install
## TODO
## Change default artifact expiration to 1 year
#Official installation instructions https://goo.gl/P6BFtf
#Requires Docker
GIT_LAB_HOSTNAME=gitlab.coddera.com
GIT_LAB_CE_VERSION=9.5.0-ce.0
GIT_LAB_RUNNER_VERSION=v9.5.0
GIT_LAB_NET=gitlab-net
@LiberQuack
LiberQuack / blueocean.md
Last active December 4, 2018 23:20
Script for installing a brand new Jenkins

Blueocean Setup

Start blueocean container by running the script bellow

docker network create ci_network &&

echo '
global
   log             127.0.0.1       local0  debug
# IMPORTANT
# Verify if /etc/nsswitch.conf is using dns as method for host resolution!
wget -O pbis.deb.sh https://github.com/BeyondTrust/pbis-open/releases/download/8.5.7/pbis-open-8.5.7.385.linux.x86_64.deb.sh &&
sudo bash ./pbis.deb.sh &&
rm -rf pbis.deb.sh &&
sudo /opt/pbis/bin/domainjoin-cli join --disable ssh A5-SOLUTIONS.LOCAL &&
sudo /opt/pbis/bin/config LoginShellTemplate /bin/bash &&
echo 'echo "[SeatDefaults]
greeter-show-manual-login=true" > /etc/lightdm/lightdm.conf' | sudo bash
@LiberQuack
LiberQuack / devops.md
Last active August 20, 2018 17:38
Recipes for configuring jenkins pipelines

Jenkins stage recipes

AWS Bucket Deploy
stage('deploy-hml') {
    agent { docker { image 'garland/docker-s3cmd' } }
    environment {
        BUCKET = 's3://hml.roteamentooi.com.br'