Skip to content

Instantly share code, notes, and snippets.

View neowinx's full-sized avatar

Pedro Flores neowinx

View GitHub Profile
@neowinx
neowinx / damelo_todo_jenkins.sh
Created April 12, 2019 19:26
Jenkins automated password recovery
#!/bin/bash
oc login -u system:admin
oc exec `oc get --all-namespaces pods | grep Running | awk '{print $2}'` cat /var/jenkins_home/secrets/initialAdminPassword
@neowinx
neowinx / config.vdf
Created September 13, 2018 00:30
Steam config.vdf with updated "CS" (content servers) field for wine
"InstallConfigStore"
{
"Software"
{
"Valve"
{
"Steam"
{
"AutoUpdateWindowEnabled" "0"
"ShaderCacheManager"
@neowinx
neowinx / movetonextgeometry.bash
Created August 16, 2018 19:20
Move to next Desktop Geometry. Useful when assigned to a hotkey whitin XFCE desktop manager
#!/bin/bash
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))
eval $(xdotool getdisplaygeometry --shell)
GEOMETRIES=`xrandr | grep connected | grep -v dis | wc -l`
CURRENT_GEO=0
((CURRENT_MAX=CURRENT_GEO * WIDTH))
echo "$CURRENT_MAX $WIDTH $X"
@neowinx
neowinx / enter-linode.bash
Created August 13, 2018 19:44
Convenient bash script to access linodes with linode-cli
#!/bin/bash
echo "press Control+C to exit anytime..."
echo "Select a linode to enter:"
select opt in $( linode-cli linodes list --text --no-headers | awk '{print $2}' ); do
ssh root@`linode-cli linodes list --no-headers --text --label $opt | awk '{print $7}'`
done
@neowinx
neowinx / hospitalrun-server-install.sh
Last active May 25, 2017 01:04
Hospitalrun-server install
#!/bin/bash
yum install -y git docker vim
curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
git clone https://github.com/HospitalRun/hospitalrun-server.git
cd hospitalrun-server
for i in 'activator' 'ivy2' 'sbt'; do wget -c "http://192.168.1.5/DEPOT/$i".zip; unzip $i.zip; cp -r home/neowinx/.$i $HOME; done
@neowinx
neowinx / setup-coursier.sh
Last active February 1, 2017 11:03
Improving SBT dependency resolution
# Let's accelerate sbt reosuluion dependency
# diclaimer: This wont work for sbt >= 1.*
mkdir -p ~/.sbt/0.13/plugins/
echo 'addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M15")' > ~/.sbt/0.13/plugins/build.sbt
curl -L -o coursier https://git.io/vgvpD && chmod +x coursier
./coursier fetch -r "ivy:https://repo.typesafe.com/typesafe/ivy-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]" com.typesafe.activator:activator-launcher:1.3.12
mkdir -p ~/.ivy2/cache
cp -vr ~/.coursier/cache/v1/https/repo.typesafe.com/typesafe/ivy-releases/* ~/.ivy2/cache/
@neowinx
neowinx / beyond-gostrap.sh
Last active January 24, 2017 03:51
Simple boostrap for new Gobolinux installations using Recetario
#!/bin/bash
# This Script does moarrr of my personal stuff with vanilla Gobo 016 installations
# First, lets define a trap method that finish the script on any error
function errors {
echo "Some error has ocurred. Check above for more hints."
exit 1
}
@neowinx
neowinx / conv.sh
Last active October 17, 2016 12:34
Convertir archivos mp4 a formato avi soportado por la autoraio sony xav-65
#!/bin/bash
#
# Convertir videos mp4 utilizando ffmpeg al formato soportado por la autoradio sony xav-65
# Author: Pedro Flores
# Fecha: 12/12/2011
function printe {
echo -e "\033[1;37m$1\033[0m"
}
@neowinx
neowinx / template_controller.yml
Created June 22, 2016 18:34
Kubernetes Generic Service Template
# YAML GENERICO PARA CREAR REPLICATION CONTROLLERS CON CONFIGURACIONES MINIMAS
apiVersion: v1
kind: ReplicationController
metadata:
name: mucus-controller
spec:
replicas: 1
selector:
app: mucus
template: