Skip to content

Instantly share code, notes, and snippets.

@SRJ9
SRJ9 / ssh-copy-id_one-line.bash
Created June 30, 2017 07:37
ssh-copy-id in one line
#!/bin/bash
sshpass -p "$PASS" ssh-copy-id $DEST_SERVER -o "StrictHostKeyChecking no"
c_black="\033[0;30m"
c_blue="\033[0;34m"
c_green="\033[0;32m"
c_cyan="\033[0;36m"
c_red="\033[0;31m"
c_purple="\033[0;35m"
c_brown="\033[0;33m"
c_light_gray="\033[0;37m"
c_dark_gray="\033[1;30m"
c_light_blue="\033[1;34m"
#!/bin/bash
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/ansible-debian.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
sudo apt-get update
sudo apt-get install ansible
#!/bin/bash
echo "deb http://download.virtualbox.org/virtualbox/debian stretch contrib" | sudo tee /etc/apt/sources.list.d/virtualbox-stretch.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.1
sudo apt-get install dkms
@SRJ9
SRJ9 / install_sublime.bash
Created June 22, 2017 13:32
Install sublime text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
#Dev
#echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
@SRJ9
SRJ9 / sass-degraded-table.scss
Created May 19, 2017 15:47
Degraded table with SASS (opacity method)
$columns: 30;
$green: rgb(92, 184, 92);
@mixin table-td-list {
@for $i from 1 through $columns {
$opacity: (1 / $i);
.table-td-#{$i} { background: rgba($green, $opacity); }
}
}
@SRJ9
SRJ9 / error_x86_64_gnu_gcc_fix.sh
Last active September 19, 2020 16:39
Fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
#!/bin/bash
# https://github.com/scrapy/scrapy/issues/2115
sudo apt-get install python3 python-dev python3-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
python-pip
@SRJ9
SRJ9 / sort_du.sh
Created February 15, 2017 17:56
sorted du
du -x -h | sort -h
@SRJ9
SRJ9 / unicode_js.txt
Created January 25, 2017 10:05
Acentos en Unicode para JS
# https://eddoinfotips.wordpress.com/2010/03/23/acentos-unicode-para-el-javascript/
\u00e1 = á
\u00e9 = é
\u00ed = í
\u00f3 = ó
\u00fa = ú
\u00c1 = Á
\u00c9 = É
\u00cd = Í
\u00d3 = Ó
@SRJ9
SRJ9 / install_sass.bash
Created January 5, 2017 11:43
install sass
#!/bin/bash
# https://www.digitalocean.com/community/tutorials/how-to-set-up-sass-on-your-vps-running-on-ubuntu
sudo apt-get update
sudo apt-get install ruby-full rubygems
sudo gem install sass