Reset all git changes one line

By | Linux, Tips | No Comments

Reset all your git changes with this one liner.

git stash -u - Removes all changes

Other options if you want something less nuclear…

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

Disable ISP DNS EdgeOS Guide Custom Nameservers

By | Networking | No Comments

Start by logging into EdgeOS so we can configure your DNS manually.

ssh ubnt@

Turn on configuration mode


Disable /etc/resolv.conf from using ISP servers – replace eth1 with your WAN interface

set interfaces ethernet eth1 dhcp-options name-server no-update

Replace with your preferred DNS below.

edit service dns forwarding
set name-server
set name-server

Finally use DNSMasq, commit and save changes.

set system name-server

To reset the adapter

renew dhcp interface eth1

Blue Shield of California Review and Problems

By | Tips | No Comments

Don’t make the mistake of signing up for Blue Shield of California. The worst issue is their support, and when it comes to healthcare – your data – and access to top quality support representatives Blue Shield of California fails miserabily. Let me note the biggest issues:

Outsourced customer service to the Philliphines – think your gonna talk to a surfer dude fresh off the beach, think again bro. You are going to be stuck with non-native English speaking staff that is irreprochable. The fun continues as they ask you for your social security number! What ? Wait you want me to tell my social security number to some outsourced employee in another country? Does anyone have any idea their data storage or security practices? What is their data retention policy? Nobody knows obviously – you’re dealing with the Philliphines.

The signup process had issues with auto-pay, their website functionality is terrible – and doesn’t work half the time.

Finally, when cancelling they are true scam artists.

I had called in to cancel my plan and after being reassured everything was handled properly I received a bill in the mail for the next month. Disgruntled, I called in to ask what happened? Surprise suprise! “We decouple our billing and subscription plans” Whatever that means?! Long story short – they didn’t cancel when I requested it – and required me to call back in and berate a manger over the head for this redicioulesness. Finally, after another 30 min phone call I had an “email confirmation” everything was cancelled. I am still waiting for the written, but my god – when you call to cancel – cancel a plan.

Buyer Beware – stay far far away from this company. They are not run as a U.S. operation.

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

gitlab_rails['rack_attack_git_basic_auth'] = {
'enabled' => true,
'ip_whitelist' => [", x.x.x.x"],
'maxretry' => 20,
'findtime' => 60,
'bantime' => 360

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

Then do gitlab-ctl reconfigure

Bonus round, also docker login -u <your username> -p <token> Should help.

aufs diff folder full docker

By | Linux | No Comments

This will clean the mess up.

sudo docker system prune -af

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

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

Install Berkeley 4.8 db libs on Ubuntu 16.04

By | Crypto Mining, Linux | No Comments

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev


cd db-4.8.30
cd build_unix/
../dist/configure --prefix=/usr/local --enable-cxx
make install



# Pick some path to install BDB to, here we create a directory within the bitcoin directory
mkdir -p $BDB_PREFIX

# Fetch the source and verify that it is not tampered with
wget ''
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
# -> db-4.8.30.NC.tar.gz: OK
tar -xzvf db-4.8.30.NC.tar.gz

# Build the library and install to our prefix
cd db-4.8.30.NC/build_unix/
# Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

# Configure Bitcoin Core to use our own-built instance of BDB
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" # (other args...)

Also commonly fixes :
libdb_cxx headers missing ubuntu
found berkeley db other than 4.8, required for portable wallets
berkeley db 4.8 ubuntu

Quickstart Guide Install MPOS on Ubuntu 16.04 – Mining Portal Open Source

By | Crypto Mining | 2 Comments

Quickstart Guide Install MPOS on Ubuntu 16.04 – Mining Portal Open Source
Simply set your MYSQL password and let the installer do the rest. When done, update you config file with new MYSQL password.

cd ~
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y git
sudo apt-get install -y build-essential libboost-all-dev libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mysql-server python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-pip make autoconf libtool g++ build-essential pkg-config unzip libboost-all-dev apache2 memcached php7.0-mysqlnd php7.0-curl php7.0-json php7.0-curl libapache2-mod-php7.0 build-essential make automake gcc php-memcached
cd db-4.8.30
cd build_unix/
../dist/configure --prefix=/usr/local --enable-cxx
make install
cd ..
echo "Berkeley libs installed"
cd ~
pip install --upgrade pip
easy_install -U distribute
pip install autobahn
git clone
git clone
git clone
cd stratum-mining
git submodule init
git submodule update
cd externals/litecoin_scrypt
python install
cd ~
cd /root/stratum-mining/externals/stratum
echo "Now update and remove setup tools and fixes RuntimeError: maximum recursion depth exceeded /root/stratum-mining/externals/stratum/distribute-0.6.28-py2.7.egg"
cat <<EOF >
#!/usr/bin/env python
#from distribute_setup import use_setuptools
#python sdist upload
from setuptools import setup
from stratum import version
      description='Stratum server implementation based on Twisted',
      install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',]
python install
cd ~
cp stratum-mining/conf/ stratum-mining/conf/
cd /var/www/html
git clone MPOS
git checkout master
echo "Enter your MYSQL password you just set"
mysql -u root -p -e "create database mpos"
echo "Again"
mysql -u root -p mpos < sql/000_base_structure.sql
sudo chown -R www-data templates/compile templates/cache
sudo cp include/config/ include/config/
cat <<EOF > /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/public/MPOS>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
apache2ctl -k stop; sleep 2; sudo apache2ctl -k start
echo "Not using a mysql password, now finish setup here: /var/www/html/MPOS/include/config/"
echo "Then check your server"

Now go ahead and install your coins and connect your RPC daemons.

(SOLVED) /sbin/ldconfig.real: /usr/lib/nvidia-375/ is not a symbolic link /sbin/ldconfig.real: /usr/lib32/nvidia-375/ is not a symbolic link

By | NVIDIA | No Comments

sudo mv /usr/lib/nvidia-375/ /usr/lib/nvidia-375/
sudo mv /usr/lib32/nvidia-375/ /usr/lib32/nvidia-375/
sudo ln -s /usr/lib/nvidia-375/ /usr/lib/nvidia-375/
sudo ln -s /usr/lib32/nvidia-375/ /usr/lib32/nvidia-375/