Skip to content

Instantly share code, notes, and snippets.

@ivandokov
ivandokov / Laravel setup on cPanel - Cron Jobs
Last active August 22, 2019 19:45
Laravel setup on cPanel
cd /home/website; rm -rf public_html; ln -s public public_html >/dev/null 2>&1
cd /home/website/public; ln -s ../storage/app/public storage >/dev/null 2>&1
@ivandokov
ivandokov / guitar-install
Created November 8, 2016 14:03
Installer for my guitar required software on Ubuntu
sudo apt-get install -y -q wine > /dev/null
sudo apt-get install -y -q timidity timidity-interfaces-extra > /dev/null
sudo apt-add-repository ppa:ubuntuhandbook1/audacity -y 2&>1 > /dev/null
sudo apt-get update > /dev/null
sudo apt-get install -y -q audacity > /dev/null
# Now install Guitar Pro 5 and in Options > Audio Settings select TiMidity for Output devices
@ivandokov
ivandokov / apple-keyboard
Created August 11, 2016 07:51
This script setup the OS for my Apple slim aluminum keyboard according to https://help.ubuntu.com/community/AppleKeyboard
echo "Making changes permanent"
sudo sed -i '/^exit 0/i \
echo 2 > /sys/module/hid_apple/parameters/fnmode\
echo 0 > /sys/module/hid_apple/parameters/iso_layout\
echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd\
' /etc/rc.local
echo -e "\033[0;32mRestart computer for all changes to take effect. Log out doesn't work.\033[0m"
@ivandokov
ivandokov / swap
Created January 6, 2016 20:37
Make swap file
sudo fallocate -l 4G /swap; sudo chmod 600 /swap; sudo mkswap /swap; sudo swapon /swap; echo "/swap none swap sw 0 0" | sudo tee -a /etc/fstab > /dev/null
echo "LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null
echo -e "\033[0;31mReload shell for changes to take effect\033[0m"
echo "ivan ALL=(ALL) NOPASSWD:ALL" | \
sudo tee --append /etc/sudoers.d/ivan > /dev/null; \
sudo chmod 0440 /etc/sudoers.d/*
# or specify only some commands to be sudoless like this:
# ivan ALL=(root) NOPASSWD: /srv/tools/cmd/*/*