Skip to content

Instantly share code, notes, and snippets.

@doidor
doidor / bundle.sh
Created October 16, 2015 09:02
Simple shell script for bundling a repo using git archive.
#!/bin/bash
GIT_BRANCH='<the_branch>'
SERVER_IP='<remote_server_ip>'
SERVER_USER='<remote_user>'
DEFAULT_COPY_PATH='<remote_path_where_to_copy_the_bundle>'
INSTALL_SCRIPT="install.sh"
# you can specify a custom git branch if you want
if [ $# -gt 0 ]; then
@doidor
doidor / install.sh
Created October 16, 2015 09:07
Django deploy script which works along with bundle.sh . It should be placed on the remote server.
#/bin/bash
TARGET_FOLDER='<target_folder_for_django_deployment>'
SYNCDB_COMMAND="$TARGET_FOLDER/<path_to_manage.py>"
# fetching the newest tar archive so we can deploy it
LATEST_TAR=`ls -t *.tar.gz | head -1`
echo "Cleaning up the target folder..."
@doidor
doidor / setup.sh
Last active October 25, 2018 20:34
basic ubuntu server with i3 setup
add-apt-repository main
add-apt-repository universe
add-apt-repository restricted
add-apt-repository multiverse
apt update
apt install -y lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings i3 wicd ubuntu-drivers-common mesa-utils mesa-utils-extra compton xorg xserver-xorg nautilus gnome-terminal git git-core zsh fonts-powerline xfe xfe-i18n xfe-themes
mkdir /tmp/debs/
@doidor
doidor / i3status_config
Created October 25, 2018 21:35
.config/i3status/config sample file
general {
output_format = "i3bar"
}
order += "load"
order += "disk /"
order += "cpu_usage"
order += "volume master"
order += "tztime local"
@doidor
doidor / generate_certificate.sh
Created July 8, 2019 08:38
Simple bash script to generate a self signed SSL certificate
#!/bin/bash
if [ $# -lt 1 ]; then
echo -e "\nNeed file name as first parameter!\n\nExample:\n$ ./generate_certificate.sh server\n"
exit 0
fi
FILE_NAME="$1"
openssl genrsa -des3 -out $FILE_NAME.key 1024 &&
@doidor
doidor / nod.sh
Last active September 25, 2019 07:14
NodeJS Babel, Jest, Flow boilerplate using nod
#!/bin/bash
usage() {
echo -e "Usage: $0 <repo_name>"
}
if [[ $# -lt 1 ]]; then
usage
exit 0
fi