h1

MacOS Sierra SSH issue solved

October 10, 2016

Just upgraded to OSX Sierra and my ssh totally broke. The fix is easy. As a super user or with sudo apply that below at the end of file /etc/ssh/ssh_config:

KexAlgorithms +diffie-hellman-group1-sha1
HostKeyAlgorithms +ssh-dss

Advertisements
h1

Crontab jobs for all US federal holidays

May 7, 2016

Ever wonder how to run crontab jobs for all US federal holidays? Below is how:

1 0 1 1 * /bin/echo “New Year’s Day”
1 0 15,16,17,18,19,20,21 1 1 /bin/echo “Martin Luther King’s Day”
1 0 15,16,17,18,19,20,21 2 1 /bin/echo “President’s Day”
1 0 25,26,27,28,29,30,31 5 1 /bin/echo “Memorial Day”
1 0 4 7 * /bin/echo “Independance Day”
1 0 1,2,3,4,5,6,7 9 1 /bin/echo “Labor Day”
1 0 8,9,10,11,12,13,14 10 1 /bin/echo “Columbus Day”
1 0 11 11 * /bin/echo “Veterans Day”
1 0 22,23,24,25,26,27,28 11 4 /bin/echo “Thanksgiving”
1 0 25 12 * /bin/echo “Christmas”

h1

GoPro HJC FG-17 chin mount

May 2, 2016

h1

How to mute ringer on iPhone

February 22, 2016

Finally Apple started to support their own keyboard the way it suits me, meaning pressing “enter” sends an imessaage/sms. Took them several years.

Anyway, when I was playing with the keyboard I found out when I press “mute”, it mutes the phone completely without pressing the side (mute) switch, but when I tried to do that from the phone, took me about forever to find a way. So below is my way.

I assigned “mute” to my assistive touch (which is under settings/general/accessibility/assistive touch/custom top level menu) and assigned “assistive touch” to my “accessibility shortcut” (which is under settings/geneal/accessbility at the very bottom).

Right now when I press my home button three times, brings “assistive touch” menu and once pressed I’m getting software button which mutes or unmutes my ringer/volume. Pressing the home button three times again, allows me to remove the “assistive touch” software button, so it doesn’t bother me.

Why do I do it that way? Variety of reasons from a broken side mute button to my case, which literally is the case… it is outter box heavy duty, and every time i need to mute the phone have to dig and open the side with my nails or a key, which is a pain and the case becomes loose after a while doing that.

So I hope you like my solution and use it from time to time. I didn’t find anything clear on google, so I wrote it down in order to help to someone like me.

Thank you.

h1

Cisco switch/router time setup to PST/PDT string

May 12, 2014

I am just tired when every time I have to type these two lines below in order to setup the clock on whatever switch/router I have to. So just copy and paste in config mode and you are done.

 

clock timezone PST -8
clock summer-time PDT recurring 2 Sun Mar 2:00 1 Sun Nov 2:00

h1

Snorby: Debug the mailing feature and creating cron job

November 4, 2013

Do not run the following commands unless you really need to:

cd /path/to/snorby

bundle exec rails c production
Snorby::Jobs::SensorCacheJob.new(true).perform
Snorby::Jobs::DailyCacheJob.new(true).perform (this command is invalid for version 2.6.2)

I tried a few things. From the shell of my CentOS 6.4 everything works fine but can’t make it automatically to send me reports, so I didn’t bother to go ahead with the source but just added that simple file (named snorby_report.cron) in /etc/cron.daily:

#!/bin/sh
cd /path/to/snorby
RAILS_ENV=production /usr/bin/rails r ‘Snorby::Jobs::SensorCacheJob.new(true).perform’

h1

Installing Snort on CentOS 6.4

November 2, 2013

My guide is simple. Just the commands you need to run. Please, read before copy and paste. It requires clean minimal installation of CentOS 6.4 and Internet connectivity:

yum install wget
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-6-8.noarch.rpm

vi /etc/yum.repo.d/remi.repo

        [remi]
        enabled=1

        [remi-php55]
        enabled=1

yum install autoconf automake bison flex gcc glibc libdnet libdnet-devel libpcap libpcap-devel make mlocate pcre-devel rpm-build zlib zlib zlib-devel

wget snort and daq source rpms from snort.org

rpmbuild –rebuild daq-2.0.1-1.src.rpm
yum localinstall rpmbuild/RPMS/x86_64/daq-2.0.1-1.x86_64.rpm
rpmbuild –rebuild snort-2.9.5.5-1.src.rpm
yum localinstall rpmbuild/RPMS/x86_64/snort-2.9.5.5-1.x86_64.rpm

yum install mysql-server
chkconfig –add mysqld
chkconfig mysqld on
service mysqld start
mysql_secure_installation