Skip to content

Instantly share code, notes, and snippets.

View sigismund's full-sized avatar

Žiga Drnovšček sigismund

View GitHub Profile
@sigismund
sigismund / git_origin_cleanup.sh
Created November 18, 2019 14:50
Cleanup of already merged branches. Excludes develop & master branch
git branch -r --merged | grep -v '\\*\\|master\\|develop' | sed 's/origin\///' | xargs -n 1 git push --delete origin
@sigismund
sigismund / docker-install.sh
Last active June 14, 2022 12:51
Install latest docker and docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
DOCKER_COMPOSE_VERSION="2.6.0"
# Alternatively you can use the official docker install script
wget -qO- https://get.docker.com/ | sh
# Install docker-compose
@sigismund
sigismund / install-docker-ubuntu-sh
Last active March 20, 2019 08:36
Basic docker install on Ubuntu
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
@sigismund
sigismund / clean-up-boot-partition-ubuntu.md
Created August 16, 2018 08:34 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@sigismund
sigismund / copy_category.php
Created December 6, 2017 12:45
Copy Magento 1.x category under other category
<?php
/*
php copy_category.php from,from to
*/
if((php_sapi_name() !== 'cli') && empty($argv))
die('Access Disabled, possible notified the admin of your attempt.' );
$start_time = microtime(true);
$initial_memory = memory_get_usage();
$initial_real_memory = memory_get_usage(true);