Kriptonium

Saturday, December 24, 2016

Rsync .ssh keys and permissions

I've had the same ssh keys for years. I just rsync them to a new system when I get one. I always seem to end up with mucked up permissions moving them around and never seem to remember how the permissions were set. Here's my reminder.
~/.ssh 700
~/.ssh/authorized_keys 600
~/.ssh/config 644
~/.ssh/id_dsa 600
~/.ssh/id_dsa.pub 644
~/.ssh/known_hosts 644

Saturday, November 26, 2016

Ubuntu - ApacheBench

$ sudo apt install apache2-utils
$ ab -c 50 -n 5000 http://kriptonium.com/

Fix Apache Error: Could not reliably determine the server’s fully qualified domain name

$ sudo systemctl status apache2
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

Nov 26 00:48:49 kripx systemd[1]: Stopped LSB: Apache2 web server.
Nov 26 00:49:04 kripx systemd[1]: Starting LSB: Apache2 web server...
Nov 26 00:49:04 kripx apache2[8738]:  * Starting Apache httpd web server apache2
Nov 26 00:49:04 kripx apache2[8738]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the ' ServerName' directive globally to suppres

Just open apache2.conf via your terminal
$ sudo nano /etc/apache2/apache2.conf

Put ServerName localhost at end of the file, then restart you Apache service.

Thursday, November 24, 2016

My programmer setup (UBUNTU)

This is just a public raw post.. Just as note for myself about my so called "dev-machine" setup. I am Fedora lovers but most of my VPS are running on Ubuntu and Centos. My computer at office are running Ubuntu LTS.
$ sudo apt-get install \
vim \
vim-gnome \
git-cola \
meld \
nautilus-compare

I use Git for tracking my source code changes for a few projects. I don’t work in it that much, so it is nice to have a GUI for certain things. The git-cola package has done that nicely in the past. Installing it also installs the actual git application.

I am not depend on IDE for my task, but some php project that use framework need IDE such Phpstorm to speed-up you project.
$ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
$ sudo apt update
$ sudo apt install ubuntu-make
$ sudo umake ide phpstorm

Do you use SublimeText editor? It awesome!!
$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
$ sudo apt-get update
$ sudo apt-get install sublime-text-installer

Hmm.. what should I write now.. ** blank **