block access to facebook.com

How to block Facebook access on Linux desktop

block access to facebook.comIn this config you can find an easy and cheap solution on how to block Facebook.com on any Linux desktop using /etc/hosts file. This is not a bulletproof solution but should help as a first level privacy protection for your kids, yourself or should aid if your students do not pay enough attention in the class.

Below you can find a list of facebook.com subdomains:

  • m.facebook.com
  • upload.facebook.com
  • apps.facebook.com
  • newsroom.fb.com
  • developers.facebook.com
  • touch.facebook.com
  • pixel.facebook.com
  • static.facebook.com
  • beta.facebook.com
  • graph.facebook.com
  • login.facebook.com
  • inyour.facebook.com
  • secure.facebook.com
  • latest.facebook.com

Read more

Virtualbox – PING from virtual machine results in (DUP!) duplicate packages

Symptoms

Virtual machine random network connectivity issues with VirtualBox. Using pingcommand results in:

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=22.2 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=22.3 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=22.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=22.2 ms (DUP!)
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, +2 duplicates, 0% packet loss, time 1009ms
rtt min/avg/max/mdev = 22.106/22.248/22.368/0.142 ms

Read more

Bitcoin mining node deployment made easy with docker

Introduction

If you feel extremely lucky or your have a supercomputer to your disposal you may try to mine for bitcoins to earn some extra cash. The complexity of Bitcoin’s block chain hashing algorithm gets stronger every 2 weeks to combat the Moore’s law so be sure to bring in some decent hardware. In this article we will show how to easily deploy a Bitcoin mining node with docker.

About

The automated trusted build of the Bitcoin mining node “linuxconfig/bitcoin-node” docker image can be used to instantly deploy a Bitcoin node on any host running docker service.

Configuration

The docker Bitcoin mining node image runs on Debian Linux and includes bitcoin daemon binaries directly downloaded from bitcoin.org. It is deployed under “root” user account. The rpcuser and rpcpassword are automatically generated during a first launch and can be located in /root/.bitcoin/bitcoin.conf.

The Bitcoin node server is configured to listen on 8333 port and this to allow for node to node commutation as well as 8332 port to accept JSON-RPC communications.

Usage

To deploy your Bitcoin node run the following linux command.

# docker run -d --name=bitcoin-node -h bitcoind -p 8332:8332 -p 8333:8333 linuxconfig/bitcoin-node

Read more

How to find and remove all empty files using shell command line

In this config you will learn how to find all empty files within a given directory using find the find command. Here is our sandbox directory /tmp/temp containing files from which some of them are empty:

.
├── dir1
│   ├── dir2
│   │   ├── file3
│   │   └── file4
│   ├── file2
│   └── file3
├── file1
└── file2

2 directories, 6 files

Let’s first locate all empty files recursively starting from a current working directory using find command:

$ pwd
/tmp/temp
$ find  . -type f -empty
OR
$ find  /tmp/temp -type f -empty
./dir1/dir2/file4
./dir1/file3
./file2

The following linux command will search for all empty file only within a current working directory, that is, not recursively:

$ find  . -maxdepth 1 -type f -empty
./file2

Read more

How to change sasl user’s password using saslpasswd2

This config we shortly describe how to update/change sasl user’s password. Firs, list sasl database to retrieve a list of all current users. If you know the exact user name for which you wish to change/update password that this step can be omitted:

# sasldblistusers2 
lubos@localhost: userPassword
radek@localhost: userPassword

Read more

Rygel – DLNA Share Media Server deployment using docker

About

The automated build Docker image of Rygel – DLNA Share Media Server “linuxconfig/rygel” can be used to instantly deploy DLNA Share Media Server on your docker hosts.

Configuration

The docker image with the Rygel – DLNA Share Media Server runs on Debian GNU/Linux system using official pre-compiled stable packages from a Debian repository.

Usage

To deploy your Rygel DLNA Share Media Server run the following linux command. Update media file paths to point to your media files located on your host system:

# docker run -d --net=host --name=rygel -v /path/video/files:/video -v /path/music/files:/music -v /path/pictures/files:/pictures linuxconfig/rygel

Read more

How to start a docker with Exited (-1) status solution

Symptoms:

Any uttmpt to start, restart a docker container results in a following error:

coreos ~ # docker start 3cabf046fa66
Error response from daemon: Cannot restart container 3cabf046fa66: [8] System error: Unit docker-3cabf046fa66eb3484a8be2c6ac162ee4e1e5c838a74b93f9a66546c9f206c24.scope already exists.
FATA[0000] Error: failed to start one or more containers 

Read more

How to initialize a git repository with Github

The below text contains a necessary commands on how to initialize a git repository with Github. Here we assume that you have created a new repository using your Github account and now you wish to push your project files into this new Github repository. In order tu push your files to a new Github repository we need to initialize it our new repository locally.

First, navigate to your project directory containing all files:

$ cd /my/project/directory

Then, initialize git:

$ git init

Read more

How to change a time zone on CoreOS Linux

The following linux commands will allow you to change the time zone on your CoreOS Linux. Currently, the time zone is set to UTC:

coreos ~ # date
Sun Aug  9 09:34:17 UTC 2015

By using the timedatectl list-timezones command you can obtain a list of all available time zones:

coreos ~ # timedatectl list-timezones

Read more