Skip to content

Instantly share code, notes, and snippets.

View kolosek's full-sized avatar

Nebojsa Zoric kolosek

View GitHub Profile
@kolosek
kolosek / country_code_mapper.rb
Created September 15, 2017 07:58
Mapping country code with country names
module PagesHelper
# Marker '#c' implies that character set has been updated on certain countries
def country_code
[["AFG", "Afghanistan"],
["ALB", "Albania"],
["DZA","Algeria"],
["ASM","American Samoa"],
["AND","Andorra"],
["AGO","Angola"],
["AIA","Anguilla"],
echo "Please install nodejs per one of our scripts"
echo "Install Erlang"
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get install aptitude
sudo aptitude install erlang-crypto
@kolosek
kolosek / docker-install.sh
Last active January 30, 2019 06:02
Ubuntu 18.04 docker installation
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
sudo apt update
sudo apt install docker-ce
echo "Check if docker installed by running: $sudo systemctl status docker"
echo "Add user to docker group"
#!/bin/bash
echo "Installing git"
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
echo "Installing ubuntu basic software"
git clone https://gist.github.com/579167be758a9bc340e10ac7e7b1f644.git ubuntu-basic-software
cd ubuntu-basic-software
@kolosek
kolosek / gitlabci-cleanup.sh
Created September 14, 2018 08:55
Cleanup old builds of gitlab
#!/bin/bash
# cleanup_gitlab_builds: to remove old gitlab builds
WORK_DIR=/home/gitlab-runner/builds
LAST_MODIFY_DAYS=30 # no of days the directory was modified
dir_array=()
space_cleared=0
skipped_dirs=()
QUIET=1
#!/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 / gitlab-runner.sh
Last active January 25, 2022 21:48
Install docker and runner on bare bone Linux 18.04.1 machine
#chmod +x gitlab-runners.sh
#Set memory allocation for each runner.
sudo sysctl -w vm.max_map_count=262144
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
sudo apt install docker-ce
@kolosek
kolosek / ubuntu-1804-basic-rails.sh
Last active January 15, 2022 18:37
Basic installation of rails under ubuntu 18.04
#!/bin/bash
echo 'This script will set up your Ubuntu 18.04 for Rails development.'
echo 'Make sure you run our Basic Library installation at https://gist.github.com/kolosek/6ee0a6f9ffe374e7a1d6ff04143cd203'
echo 'Press ENTER to continue with installation, press ^C to cancel.'
# libssl1.0-dev
read
# Install RVM
echo "------Installing rvm------"
sudo apt install -y curl gnupg2
@kolosek
kolosek / private_fork.md
Created November 24, 2018 15:30 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@kolosek
kolosek / open-source-projects
Last active November 29, 2018 10:50
Interesting open source projects
### A tiny drop-in REST API to send emails
https://github.com/dthree/mailit
## Sceleton for new Rails app
https://github.com/thoughtbot/suspenders
## How to do refactoring
https://github.com/shakacode/fat-code-refactoring-techniques
## Codility