Category

Linux

enable swap ubuntu

By | Linux | No Comments

Easily enable swap on Ubuntu 16.04 with this easy to use one-liner.

sudo fallocate -l 16G /swapfile
#If fallocate is not available, use 
#dd if=/dev/zero of=/swapfile1 bs=1024 count=137438883103
#For 128gb
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
echo 'vm.swappiness = 10' | sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
echo "Swap enabled"

 

 

Install the latest Firefox Quantum 57.0 on Ubuntu 16.04 / Zorin OS

By | Linux | No Comments

Install the latest Firefox Quantum 57.0 on Ubuntu 16.04 / Zorin OS
[raw]
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get update
sudo apt-get upgrade -y firefox
[/raw]

Version 57.0, first offered to Release channel users on November 14, 2017

Brace yourself for an all-new Firefox. It’s fast. Really fast. It’s over twice as fast as Firefox from 6 months ago, built on a completely overhauled core engine with brand new technology from our advanced research group, and graced with a clean, modern interface. Today is the first of several releases we’re calling Firefox Quantum, all designed to get to the things you love and the stuff you need faster than ever before. Experience the difference on desktops running Windows, macOS, and Linux; on Android, speed improvements are landing as well, and both Android and iOS have a new look and feel. To learn more about Firefox Quantum, visit the Mozilla Blog.

See the full Release Notes here.
57.0+build4-0ubuntu0.16.04.5 and higher.

ffmpeg convert mov to html5 4k mp4 webm ogv

By | Linux | No Comments

[raw]
#MP4
#baseline and faststart are set for max compatibility, veryslow used for smallest file size
ffmpeg -i INPUT.mov -f mp4 -vcodec libx264 -preset veryslow -profile:v baseline -level 3.0 -acodec aac -strict -2 OUTPUT.mp4 -hide_banner -movflags +faststart

#OGV
#adjust scaling by 1-10 with ogv.
#https://trac.ffmpeg.org/wiki/TheoraVorbisEncodingGuide
ffmpeg -i INPUT.mov -codec:v libtheora -qscale:v 10 -codec:a libvorbis -qscale:a 10 OUTPUT.ogv

#WEBM
ffmpeg -i INPUT.mov -q:v 10 -c:v libvpx -c:a libvorbis OUTPUT.webm
[/raw]

Fix tracker-store and tracker-fs high CPU usage on Ubuntu / Zorin OS

By | Linux | One Comment

Fix tracker-store and tracker-fs high CPU usage on Zorin OS.

[raw]
echo -e “\nHidden=true\n” | sudo tee –append /etc/xdg/autostart/tracker-extract.desktop /etc/xdg/autostart/tracker-miner-apps.desktop /etc/xdg/autostart/tracker-miner-fs.desktop /etc/xdg/autostart/tracker-miner-user-guides.desktop /etc/xdg/autostart/tracker-store.desktop > /dev/null
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset –hard
[/raw]

Install Sublime 3 / Docker-CE / GitKraken / Slack / Shutter Developer Setup

Install Sublime 3 / Docker-CE / GitKraken / Slack / Shutter Developer Setup

By | Linux | No Comments

Install Sublime 3 / Docker-CE / GitKraken / Slack / Shutter on Zorin OS

[raw]
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install -y sublime-text-installer shutter
sudo apt-get install -y apt-transport-https ca-certificates curl 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 -y docker-ce
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
sudo dpkg -i gitkraken-amd64.deb
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-2.8.2-amd64.deb
sudo dpkg -i slack-desktop-2.8.2-amd64.deb
[/raw]

nvidia-384 libEGL.so.1 is not a symbolic link solved

By | Linux, NVIDIA | No Comments

Fixes NVIDIA-384 problem with libEGL.so.1 is not a symbolic link
[raw]
sudo mv /usr/lib/nvidia-384/libEGL.so.1 /usr/lib/nvidia-384/libEGL.so.1.org
sudo mv /usr/lib32/nvidia-384/libEGL.so.1 /usr/lib32/nvidia-384/libEGL.so.1.org
sudo ln -s /usr/lib/nvidia-384/libEGL.so.384.90 /usr/lib/nvidia-384/libEGL.so.1
sudo ln -s /usr/lib32/nvidia-384/libEGL.so.384.90 /usr/lib32/nvidia-384/libEGL.so.1
[/raw]

Reset all git changes one line

By | Linux, Tips | No Comments

Reset all your git changes with this one liner.

[raw]
git stash -u – Removes all changes
[/raw]

Other options if you want something less nuclear…
[raw]
git checkout . – Removes Unstaged Tracked files ONLY
git clean -f – Removes Unstaged UnTracked files ONLY
git reset –hard – Removes Staged Tracked and UnStaged Tracked files ONLY
[/raw]

error parsing HTTP 403 response body: invalid character ‘F’ looking for beginning of value: “Forbidden\n”

By | Linux | No Comments

To fix this Gitlab error please edit your /etc/gitlab/gitlab.rb file and update your whitelist with

[raw]
gitlab_rails[‘rack_attack_git_basic_auth’] = {
‘enabled’ => true,
‘ip_whitelist’ => [“127.0.0.1, x.x.x.x”],
‘maxretry’ => 20,
‘findtime’ => 60,
‘bantime’ => 360
}
[/raw]

Replacing x.x.x.x with the IP you are trying to login with.

Then do [raw]gitlab-ctl reconfigure[/raw]

Bonus round, also [raw]docker login -u <your username> -p <token> registry.gitlab.com[/raw] Should help.

aufs diff folder full docker

By | Linux | No Comments

This will clean the mess up.

[raw]
sudo docker system prune -af
[/raw]

But sometimes that’s not enough.  The following will nuke all your images and reclaim your space.

[raw]

sudo service docker stop
sudo rm -rf /var/lib/docker
sudo service docker start

[/raw]