Skip to content

Instantly share code, notes, and snippets.

View kolosek's full-sized avatar

Nebojsa Zoric kolosek

View GitHub Profile
#!/bin/bash
#Preuzimanje i instalacija dependency-a
echo "Preuzimanje i instalacija dependency-a..."
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl git-core gdebi-core gdebi rar unrar gnupg2 vim qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x build-essential libssl-dev libreadline-dev libyaml-dev libxslt1-dev software-properties-common libcurl4 libcurl4-openssl-dev libcurl3-dev
#Instalacija imagemagick
echo "Preuzimanje i instalacija imagemagick..."
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y imagemagick libmagickcore-dev libmagickwand-dev
Ruby older than 2.4 relies on OpenSSL libary version 1.0
Ruby from version 2.4 relies on OpenSSL library version 1.1
Newer ubuntu 20.04 comes with openssl-dev1.1 pre-installed. And installing older version of Ruby is not possible, since you have 1.1 version of Openssl.
I am sure you see a conflict there. Solution to this problem is to remove open ssl from Ubuntu:
sudo apt purge openssl-dev
And install ruby version via RVM. But you need to add PPA so RVM can find older openssl.
@kolosek
kolosek / asterisk.sh
Last active March 13, 2024 15:20 — forked from linuxoracledev/asterisk.sh
Install Asterisk 16 LTS on Ubuntu 18.04 / 16.04 & Debian 10/9
#Update system & reboot
sudo apt update && sudo apt -y upgrade
sudo reboot
#Install Asterisk 16 LTS dependencies
sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev
#Add universe repository and install subversio
sudo add-apt-repository universe
sudo apt update && sudo apt -y install subversion
@kolosek
kolosek / asterisk.sh
Created May 23, 2020 09:00 — forked from linuxoracledev/asterisk.sh
Install Asterisk 16 LTS on Ubuntu 18.04 / 16.04 & Debian 10/9
#Update system & reboot
sudo apt update && sudo apt -y upgrade
sudo reboot
#Install Asterisk 16 LTS dependencies
sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev
#Add universe repository and install subversio
sudo add-apt-repository universe
sudo apt update && sudo apt -y install subversion
@kolosek
kolosek / postgres_backup.sh
Created May 5, 2020 17:57
Script for making automatic dumps of postgres database sorted by date
#!/bin/bash
DIR=/home/httpd/DIR_LOCATION;
DB=(DATABASE_NAME);
DATE=$(/bin/date '+%Y%m%d');
TENDAY=$(/bin/date -d'10 days ago' '+%Y%m%d');
/bin/mkdir -p $DIR/$DATE/;
for d in "${DB[@]}"
do
pg_dump -f $DIR/$DATE/$d.sql $d;
#!/bin/bash
echo 'This script will set up your Ubuntu 18.04 for Rails development.'
echo 'Press ENTER to continue with installation, press ^C to cancel.'
read
# Install required software
echo "------Installing requirements------"
sudo apt install -y curl git-core gdebi-core gdebi rar unrar gnupg2 vim
@kolosek
kolosek / rspec_model_testing_template.rb
Created March 26, 2020 09:23 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
Server pre-requirements:
sudo apt install openresolv
sudo apt install ufw
sudo ufw allow ssh
sudo ufw default allow outgoing
sudo ufw enable
Intstructions with sudo:
https://github.com/wg-dashboard/wg-dashboard
#!/bin/bash
echo "Installing Java JRE and Java JDK"
sudo add-apt-repository ppa:openjdk-r/ppa
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install python-software-common software-properties-common
sudo apt-get update
sudo apt install default-jre default-jdk gdebi -y
@kolosek
kolosek / basic-library-install.sh
Created July 12, 2019 07:17
Basic library install on Ubuntu 18.04
#!/bin/bash
echo 'This script will set up your Ubuntu 18.04 for Rails development.'
echo 'Press ENTER to continue with installation, press ^C to cancel.'
read
# Install required software
echo "------Installing requirements------"
sudo apt install -y curl libssl1.0-dev gdebi-core gdebi rar unrar gnupg2 vim