tag:blogger.com,1999:blog-13046322146445261422024-02-21T11:11:54.465+08:00Scratching My NeedsPsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.comBlogger236125tag:blogger.com,1999:blog-1304632214644526142.post-38743879362253467672015-01-13T14:22:00.001+08:002015-01-13T14:22:24.132+08:00Scratch of the day - "yes" to all<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge18Xys1Ak3mRPsLaXdPwzooxDT8sS45_MUySmKbnwjjfqCXAS_K6Tr8erGq8RutU7eqse3H3ImCSHiqKNS8zPn2DQTSCNwLfs-XMX2TDG7-Y7Li1TdCPS0dX73vF8bUBH_oc8pur5hVVu/s1600/logo_openbsd.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge18Xys1Ak3mRPsLaXdPwzooxDT8sS45_MUySmKbnwjjfqCXAS_K6Tr8erGq8RutU7eqse3H3ImCSHiqKNS8zPn2DQTSCNwLfs-XMX2TDG7-Y7Li1TdCPS0dX73vF8bUBH_oc8pur5hVVu/s1600/logo_openbsd.png"></a></div>While browsing on /usr/src/usr.bin to kill some time, found "yes". The <a href="http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-5.6/man1/yes.1?query=yes&arch=amd64&manpath=OpenBSD-5.6">manpage</a> was simple:<br>
<blockquote><b>NAME</b><br>
yes — be repetitively affirmative<br>
<br>
<b>SYNOPSIS</b><br>
yes [expletive]<br>
<br>
<b>DESCRIPTION</b><br>
yes outputs expletive, or, by default, “y”, forever.<br>
</blockquote><br>
<br>
So, it repeats "y" forever. A quick try rev up my processor to the max and<a href="http://scratching.psybermonkey.net/2015/01/scratch-of-day-yes-to-all.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-3197279771447185832014-11-05T20:24:00.000+08:002014-11-05T20:27:55.431+08:00Book review - The Book of PF 3rd Edition<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgulZdslP0km-5qciHiBLafhs04eDxDlA011UXlxYT7Z9hOgpX794oDEg-K9TyEt54r_EEzcDB9DKaZdC1kBk2Ay7086WyRcoLd5_bbanQe43XRtjbR-Kc4fEuQDzmCMCXp0JcWovqhUfqg/s1600/ao2e-bookcover.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgITmciOJ0PxvSgoo-A5-DjLBTBATzmVqkTt2d0waFWC6AduPS6pI_w-59hq0hzNkd5J384eSNYARb2df7acrSgEVwYW_vi5c6DlVZsOXSUE6h5UsnLdGoTnQd-j5c7EI3IohK5iRuaghQA/s320/pf3e-cover01.png" height="320" width="242"></a></div>PF has always been my "only" choice of firewall when I'm on <a href="http://www.openbsd.org/">OpenBSD</a> or <a href="http://www.freebsd.org/">FreeBSD</a>. My PF kungfu is just enough to use it as a host firewall though. Recently I needed to level up my PF skill in order to use it on one of my hobby project. This book came in the right time.<br>
<br>
Since I'm using OpenBSD, the excellent <a href="http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/pf.conf.5?query=pf.conf">manual</a> & <a href="http://www.openbsd.org/faq/pf/index.html">FAQ</a> at <a href="http://www.openbsd.org/">www.openbsd.org</a> would have what I needed. But the commercial offering (of <a href="http://www.nostarch.com/pf3">this book</a>) illustrated PF differently and with much more working examples. This means my homework is already done mostly, leaving me to read and "realized" the knowledge. :)<br>
<br>
This is a short summary on what I found interesting while reading this book:<a href="http://scratching.psybermonkey.net/2014/11/book-review-book-of-pf-3rd-edition.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-85839371926300783552013-09-16T20:55:00.001+08:002013-09-16T20:55:36.444+08:00What's worth - week 34, 35, 36 & 37This post is so disqualify as weekly post. Apparently I'm busy with real world but in fact, I need to build up this habit to sit down and organize what I've read and post it up here.<br>
<br>
Anyway, here's the archive of links & reads for what's worth:<a href="http://scratching.psybermonkey.net/2013/09/whats-worth-week-34-35-36-37.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-28156464923172620992013-08-29T23:50:00.000+08:002013-08-29T23:50:47.190+08:00What's worth - week 32 & 33Last seen on fortnight ago and still lacking reading time. Here's two weeks of what's worth: <a href="http://scratching.psybermonkey.net/2013/08/whats-worth-week-32-33.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-16196125150485573112013-08-16T23:48:00.001+08:002013-09-16T15:45:22.650+08:00What's worth - week 27, 28, 29, 30 & 31Finally get the chance to put in these links. "Busy" is the usual excuse, lack of discipline is the real cause :p<br>
<br>
So much for nonsense, here's the link accumulated for the passed weeks (if not months):<a href="http://scratching.psybermonkey.net/2013/08/whats-worth-week-27-28-29-30-31.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-63273635794885493472013-07-06T23:11:00.000+08:002013-08-16T23:50:24.234+08:00What's worth - week 25 & 26For the past 2 weeks, meat space have been a busy but very interesting one. Much to my realized the world without BSD are wild & unstable, but yet surprisingly interesting. I wouldn't recommend anyone with less sanity to spare but if you must have a dangerous adventure, try linux kvm on a (mere) load average of 38 with dual six core processor. All process curse & swear.<br>
<br>
Worse, even after so many iterations of versions, the BSOD stalks me forever. Why must they keep pushing me to BSDs? Daemons, I miss you so much.<br>
<br>
Enough bitching, readings for the past 2 weeks have been low and I'm combining week 25 & 26. Nonetheless, my time was well spent on these links. Here's what's worth:<a href="http://scratching.psybermonkey.net/2013/07/whats-worth-week-25-26.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-26906470044811299242013-06-18T12:55:00.000+08:002013-08-16T23:50:33.725+08:00What's worth - Week 24This blog hasn't been updated as ofter as it should. That doesn't mean I'm abandoning. I'm still lurking on the internet, poking my nose around here and there. <br>
<br>
I routinely read Justin's <a href="http://www.shiningsilence.com/dbsdlog/">Dragonfly BSD Digest</a> and particularly fond of "<a href="http://www.shiningsilence.com/dbsdlog/category/lazy-reading">Lazy Reading</a>" weekly post. He'll talk about the list of interesting stuff he finds on the internet and share it with the readers. I'm copying his idea to fuel my updating of this blog.<br>
<br>
For what's worth, here it goes:<a href="http://scratching.psybermonkey.net/2013/06/whats-worth-week-24.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-79356479588556865532013-05-17T18:13:00.001+08:002013-05-17T18:14:51.387+08:00Book review - DNSSEC Mastery<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0L_9u1Yp2ur2TrWATLfwYQI_bngquGNQQILVhUk8rcHbSdisAWXBUoocpZRKN13hlpxJF3ALIiQ9OA0RmyzP96GGCt61KfOocHMfIPLsfQQ2-0z4Qjgv1K3U0YanujRLOksTVDrFoPDq7/s1600/DNSSEC-Master-bookcover.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0L_9u1Yp2ur2TrWATLfwYQI_bngquGNQQILVhUk8rcHbSdisAWXBUoocpZRKN13hlpxJF3ALIiQ9OA0RmyzP96GGCt61KfOocHMfIPLsfQQ2-0z4Qjgv1K3U0YanujRLOksTVDrFoPDq7/s320/DNSSEC-Master-bookcover.jpg" width="213"></a></div>For the past few days, I've spent most of my reading time with a new book titled <a href="https://www.michaelwlucas.com/nonfiction/dnssec-mastery">DNSSEC Mastery</a>. The author of the book is <a href="http://blather.michaelwlucas.com/">Michael W. Lucas</a>, again (from my not too long ago <a href="http://scratching.psybermonkey.net/2013/04/book-review-absolute-openbsd-2nd-edition.html">book review</a> blog post, <a href="https://www.michaelwlucas.com/nonfiction/absolute-openbsd-2nd-edition">Absolute OpenBSD 2nd Edition</a>). He's now one of my favorite tech book author, upgraded from "favorite blog author". The "upgrade" was done after reading another of his new book published by <a href="http://nostarch.com/obenbsd2e">No Starch Press, Absolute OpenBSD 2nd Edition</a>. This review is the result of my reading of DNSSEC Mastery. It may not be the whole truth, but at least this is what I've understand from it.<br>
<br>
Here it goes:<a href="http://scratching.psybermonkey.net/2013/05/book-review-dnssec-mastery.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-50140906036356631162013-04-26T18:24:00.000+08:002013-04-26T18:24:13.284+08:00Book review - Absolute OpenBSD 2nd Edition<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgulZdslP0km-5qciHiBLafhs04eDxDlA011UXlxYT7Z9hOgpX794oDEg-K9TyEt54r_EEzcDB9DKaZdC1kBk2Ay7086WyRcoLd5_bbanQe43XRtjbR-Kc4fEuQDzmCMCXp0JcWovqhUfqg/s1600/ao2e-bookcover.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgulZdslP0km-5qciHiBLafhs04eDxDlA011UXlxYT7Z9hOgpX794oDEg-K9TyEt54r_EEzcDB9DKaZdC1kBk2Ay7086WyRcoLd5_bbanQe43XRtjbR-Kc4fEuQDzmCMCXp0JcWovqhUfqg/s320/ao2e-bookcover.png" width="242"></a></div>If you're following BSD related news, you probably would have know about <a href="https://www.michaelwlucas.com/nonfiction/absolute-openbsd-2nd-edition">Absolute OpenBSD, 2nd Edition</a>. The author is <a href="http://blather.michaelwlucas.com/">Michael W. Lucas</a>, well known for fantastic technical books (Absolute FreeBSD, Network Flow Analysis, SSH Mastery, DNSSEC Mastery & others ). A while ago, I got hold of this book, Absolute OpenBSD 2nd Edition (in short, AO2E), and spent some time on it. These are my findings, it may not be the whole truth but it is definitely how I understand it. <a href="http://scratching.psybermonkey.net/2013/04/book-review-absolute-openbsd-2nd-edition.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-44763949032941998282013-04-14T01:03:00.000+08:002013-04-14T01:03:15.223+08:00Absolute OpenBSD, 2nd Edition - Book auctioning<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQsJAtxFmKjUcnqhevbK4pAy9V_aetGGzDn9DAlY5XvuA49rKztq01h5N2Leyk-s3e3igbaOLKgX9Au6TyY5bCk6L4Jqe61XtPBgQbceqsQE8wkSKA8pN0RRXeCRxnGAEM8TN51CBvIzxB/s1600/openbsd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQsJAtxFmKjUcnqhevbK4pAy9V_aetGGzDn9DAlY5XvuA49rKztq01h5N2Leyk-s3e3igbaOLKgX9Au6TyY5bCk6L4Jqe61XtPBgQbceqsQE8wkSKA8pN0RRXeCRxnGAEM8TN51CBvIzxB/s1600/openbsd.png" /></a></div>By now, everyone living in the BSD world would have known that <a href="http://blather.michaelwlucas.com/about">Michael W. Lucas</a> <a href="https://www.michaelwlucas.com/nonfiction/absolute-openbsd-2nd-edition">new book on OpenBSD</a> is going to be release soon. By soon, I mean there's a couple of weeks more to go. If you have been following <a href="http://blather.michaelwlucas.com/">Michael's blog</a> or read his technical books, you would probably have a taste of his writing style. Which suits my taste a lot. <br />
<br />
Michael is <a href="http://blather.michaelwlucas.com/archives/1646">auctioning "a" copy of Absolute OpenBSD, 2nd Edition book</a>, with all proceedings going to <a href="http://www.openbsdfoundation.org/activities.html">OpenBSD Foundation</a>. The OpenBSD Foundation pay bills so that the project continue to shine.<br />
<br />
If you have a few spare zeroes in your bank account and really want,<br />
<br />
- the very first copy of Michael's book, with all the proofs<br />
- or, to show how much love you have for OpenBSD<br />
- or, to redeem the guilt of ripping off OpenBSD for all these happy years of using it<br />
<br />
move your mouse over to "Place bid" and press it at the <a href="http://www.ebay.com/itm/Absolute-OpenBSD-2nd-Ed-by-Michael-Lucas-Special-signed-first-copy-printed-/200913454300?">auctioning page</a>. The money you pay for the "clicks" & the book, will go into funding of making OpenBSD better. Not to forget the bragging rights of owning the very first copy of Absolute OpenBSD (2nd Edition) with "Certificate of Authenticity" that Michael promised to put on it.<br />
<br />
Okay, if you don't have that much zeroes in your bank account and would really like to have a copy of the book (not the shiny first copy though), you can still do a bit for the OpenBSD project. Get the book from <a href="http://www.openbsd.org/books.html">OpenBSD website</a> and some of the money will go into making OpenBSD better.<br />
<br />
<i>Au revoir !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-85626025861792272392013-03-04T15:40:00.001+08:002013-03-04T15:40:31.878+08:00vim - improving vim skill by breaking arrow keys<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfwRwpL91_JIx_0181DoDVEp6o7yvuFRXXIPNVY_tF7_P8OE2Ws10GyGUAJRyThQbs1uGb1Iwt6NcmKa1uIi1mKGcIX_Xd2Eo4hXKwfQYpXFUEUbcPJvfQicoF6NDKIS4VXTksQfbeFsP-/s1600/vim-logo.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfwRwpL91_JIx_0181DoDVEp6o7yvuFRXXIPNVY_tF7_P8OE2Ws10GyGUAJRyThQbs1uGb1Iwt6NcmKa1uIi1mKGcIX_Xd2Eo4hXKwfQYpXFUEUbcPJvfQicoF6NDKIS4VXTksQfbeFsP-/s320/vim-logo.jpg" /></a></div>Improving vim skill have a new way, "breaking" the arrow keys on the keyboard. <br />
<br />
No No, not literally! Just disable them by assigning "<i>no operation</i>" to the arrow keys stroke. This will render your arrow keys useless when you're inside vim editor, thus forcing you to stick to h, j, k & l key to move around. <br />
<br />
<br />
<br />
Put these into ~/.vimrc:<br />
<pre class="commands-codes">noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
</pre><br />
If this is not dramatic enough, I foresee I'll put these in as well:<br />
<pre class="commands-codes">noremap h <NOP>
noremap j <NOP>
noremap k <NOP>
noremap l <NOP>
</pre><br />
further forcing myself to use keys like "w", "b", "e", "ge", "W", "B", "E", "gE", "f", "F", "t", "T", ";" & ",". To decrypt those characters, check out ":help word" in vim editor.<br />
<br />
Via <a href="http://www.shiningsilence.com/dbsdlog/2013/03/03/11297.html">here</a> then <a href="http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/">here</a>.<br />
<br />
<i>Adios!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-83886434789493252122012-12-28T23:17:00.001+08:002012-12-28T23:17:44.733+08:00FreeBSD Foundation - 2012 Year-End Fundraising Campaign<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEBBnfQiW_IQJ2yQyT9fpL5cyi872M_aqoudwOOOq0CgTfJCbYe_gLt4rFdZS4ttgmMvF_BuaL14oiM63nMztuoXwsT3U2jWwjiluDy3ima1d6CjWPf1XbNeEBCaw_OPgAiidpAJEnBXRj/s1600/freebsdfoundation-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEBBnfQiW_IQJ2yQyT9fpL5cyi872M_aqoudwOOOq0CgTfJCbYe_gLt4rFdZS4ttgmMvF_BuaL14oiM63nMztuoXwsT3U2jWwjiluDy3ima1d6CjWPf1XbNeEBCaw_OPgAiidpAJEnBXRj/s320/freebsdfoundation-logo.png" /></a></div>
Just did a quick check on the targeted $500k donations and <a href="http://www.freebsdfoundation.org/">FreeBSD Foundation</a> have made it!
<br />
As of this post, <a href="http://www.freebsdfoundation.org/">FreeBSD Foundation</a> have managed to surpass it's 2012 fund raising goal by $184 905, at the total of $684 905.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUS9jFvKg4TB0-A6ZW9I_TVlghxuNa1wWi-t4gRtPGBUNCKoylpOUU1mWfdCsH_ty7OIFx5vg0uYXVjdNHZ4DWI611knOf0o86UpCdmebg6Wjp6lmvKS2i2lAEaX-0fdoXXK0-FMPUTim/s1600/donate-20121228.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUS9jFvKg4TB0-A6ZW9I_TVlghxuNa1wWi-t4gRtPGBUNCKoylpOUU1mWfdCsH_ty7OIFx5vg0uYXVjdNHZ4DWI611knOf0o86UpCdmebg6Wjp6lmvKS2i2lAEaX-0fdoXXK0-FMPUTim/s400/donate-20121228.png" width="155" /></a></div>
This is no doubt a great news to the end 2012 and I look forward to see more of these contribution towards <a href="http://www.freebsdfoundation.org/">FreeBSD Foundation</a>, funding my favorite operating system FreeBSD.
<br />
<br />
Merry Christmas & Happy New Year !!!PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-13818636370476685722012-12-28T19:28:00.000+08:002012-12-28T19:28:43.915+08:00AboutBSD.net - outage<br />
This is all purely my fault as I was updating mysql-[server|client] then detach tmux, and forgot about it. I definitely need nagios to monitor <a href="http://aboutbsd.net">AboutBSD.net</a>.
Sorry for all the inconvenience caused.PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-58966924883743277602012-08-10T09:46:00.000+08:002012-08-10T09:46:56.816+08:00Scratch of the day - PHP Warning: date(): It is not safe to rely on the system's timezone settings<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlUrKBgvhGU35LmC2dofp1axwrMkSzdXCqfFR_iIxlr-zQXZV-HjtVqg82K2uJ8b9ki973EqxoWZdZHVKzKzbOOi1ZCoZaNHeLTMjmplfiGg1s61JFfpNrh3EVmJGgXlTuFcrS8ZRgFtk4/s1600/php-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlUrKBgvhGU35LmC2dofp1axwrMkSzdXCqfFR_iIxlr-zQXZV-HjtVqg82K2uJ8b9ki973EqxoWZdZHVKzKzbOOi1ZCoZaNHeLTMjmplfiGg1s61JFfpNrh3EVmJGgXlTuFcrS8ZRgFtk4/s1600/php-logo.png"></a></div><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Yesterday, I noticed one of my Apache server's error log is growing like 1.1 gb in 12 hours. The log is full of these : <a href="http://scratching.psybermonkey.net/2012/08/scratch-of-day-php-warning-date-it-is.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-17931835425597432902012-07-27T08:30:00.001+08:002012-07-27T08:31:43.747+08:00AboutBSD.net - Layout changes<br /><br />
Just did a wordpress theme change for a facelift to <a href="http://aboutbsd.net">http://aboutbsd.net</a>. <br />
Probably there will be a few change on the background & header.<br />
Do let me know if you have any suggestion.PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-20845804691910909212012-07-20T14:05:00.000+08:002012-07-20T14:05:59.832+08:00Scratch of the day - How to disable mouse gesture in Firefox on OS X<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm6kXLf9fgoK1FyJPeba2nscJmHkAJUiOxknzwl2tUK_FRvunanM-5M0wh8oMQ8nrmohnR6xwGMU0I6jg1KfEFMkiAL7qty0a1fn37CogM8PwK62iCdefiLtlc-lrcebeabz-SGV-mY64L/s1600/firefox-image.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm6kXLf9fgoK1FyJPeba2nscJmHkAJUiOxknzwl2tUK_FRvunanM-5M0wh8oMQ8nrmohnR6xwGMU0I6jg1KfEFMkiAL7qty0a1fn37CogM8PwK62iCdefiLtlc-lrcebeabz-SGV-mY64L/s1600/firefox-image.png" /></a></div>Starting from OS X snow leopard (10.6) to Lion (10.7), Firefox have a mouse gesture of swiping 2 fingers left as go back a page in history & swiping to the right as go forward a page in history. Some times it is too sensitive as I scroll up & down in text reading would also trigger this behavior. Then I need reload the page again to get back where am I. <br />
<br />
Search in Google & Duckduckgo doesn't yield much useful instructions. But out of a sudden a bulb lights up, this could be due to the mouse gestures that is being mischievous all these times!<br />
<br />
It turns out that turning off the "Swipe between pages" in Mouse -> More Gestures does disable this mischievous behavior. :)<br />
<br />
<i>Arrivederci !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-64306547112528107102012-07-13T14:28:00.000+08:002012-07-13T14:28:07.690+08:00Scratch of the day - php throwing stricts error on browser<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png"></a></div>Today, I had to setup a Postgresql database server with phpPgAdmin web interface. While visiting the web interface for the first time, this error message appears on the top :<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<pre class="commands-codes">Strict Standards: Only variables should be assigned by reference in
/usr/local/www/phpPgAdmin/classes/database/Connection.php on line 23
Warning: Cannot modify header information - headers already sent by
(output started at /usr/local/www/phpPgAdmin/classes/database/Connection.php:23)
in /usr/local/www/phpPgAdmin/classes/Misc.php on line 540</pre><br>
Seems like php 5.4.4 imposed some extra measure as best practice.<br>
<br>
Although phpPgAdmin works as usual, the error message is annoying. Plus, it is kind of bad to show what potentially can be exploit. <br>
<br>
To turn off these error messages, just tweak the below parameter in /usr/local/etc/php.ini :<a href="http://scratching.psybermonkey.net/2012/07/scratch-of-day-php-throwing-stricts.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-57721584477247403302012-05-16T07:34:00.000+08:002012-05-16T07:34:57.941+08:00Scratch of the day - ssh transfer from server to server<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZ8lsL6u7_LAyH5Z4HSaFjn8__TQC-1PL_UBA8T2fwCdMoV-EM7SRkDka6iDhsNg_UJ4LuNkAQjouFE2juJFjmeE6jeZuEJGK40YTGBie3YkoXSYBAI1rI_xlS8SR7wukaBih6GxJb3SZ/s1600/ssh-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZ8lsL6u7_LAyH5Z4HSaFjn8__TQC-1PL_UBA8T2fwCdMoV-EM7SRkDka6iDhsNg_UJ4LuNkAQjouFE2juJFjmeE6jeZuEJGK40YTGBie3YkoXSYBAI1rI_xlS8SR7wukaBih6GxJb3SZ/s320/ssh-logo.png" /></a></div>There's 2 servers which configured only my workstation is able to login using ssh keys. But I need to transfer files between these 2 servers. Downloading from server A to my workstation then upload the files to server B seems to be way. It would be good if I can combine the 2 operations into 1 single execution. <br />
<br />
With shell's pipe, cat & ssh, this is what I've come up with :<br />
<pre class="commands-codes">ssh bob@server-A.example.com "cat /source/file-or-directory.txt" | \
ssh bob@server-B.example.com "cat > /destination/file-or-directory.txt"</pre><br />
<i>Shalom !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-20016169978533223312012-05-11T14:06:00.000+08:002012-05-11T14:06:12.911+08:00Scratch of the day - exclude logging to /var/log/messages<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>After telling <a href="http://www.isc.org/software/dhcp">dhcpd</a> to log messages to local7 of syslogd, "uid lease" messages are still being log in /var/log/messages. This is because by default, syslogd logs "notice" level and above to /var/log/messages. <br />
<br />
If you don't wanna see these messages in /var/log/messages, which it has already log to /var/log/dhcpd.log, include the log level "none" that tells syslogd logs to /var/log/messages. This assumed that <a href="http://www.isc.org/software/dhcp">dhcpd</a> is configured to use log facility "local7" in it's config file, that output all messages to /var/log/dhcpd.log.<br />
<br />
<br />
Example :<br />
(in /etc/syslog.conf)<br />
<pre class="commands-codes">----- snip -----
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;local7.none /var/log/messages
----- snip ----</pre><br />
Reload syslogd and monitor /var/log/messages & /var/log/dhcpd.log :<br />
<br />
<pre class="commands-codes">/etc/rc.d/syslogd reload</pre><br />
<i>Namaste !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-45636321763246323782012-04-13T15:23:00.000+08:002012-04-13T15:23:20.937+08:00Scratch of the day - ISC dhcpd is complaining about subnet declaration<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>Just now, restarting the <a href="http://www.isc.org/">ISC</a> <a href="http://www.isc.org/software/dhcp">DHCP</a> server, after adding new subnet, spill out some error messages :<br />
<pre class="commands-codes">No subnet declaration for gem0 (192.168.168.168).
** Ignoring requests on gem0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface gem0 is attached. **
Sending on Socket/fallback/fallback-net</pre><br />
This is because the DHCP server doesn't find any "subnet" declaration on the IP used on interface gem0. Tell DHCP server to listen on the intended interface by putting the below line in /etc/rc.conf :<br />
<br />
<pre class="commands-codes">dhcpd_ifaces="gem1"</pre><br />
This will make DHCP server listen on "gem1" and ignore listening on "gem0".<br />
<br />
<i>Adios !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-83395721985282563362012-04-09T20:34:00.000+08:002012-04-09T20:34:54.513+08:00Scratch of the day - arpresolve: can't allocate llinfo<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>Today, one of the server was uncontactable after a network switch flood incident. All other servers are working fine except this one. Log into this server through the console, reveals :<br />
- ping to gateway is fine<br />
- ping to a host outside this network failed<br />
- ssh connection to same segment is fine but not beyond gateway<br />
<br />
<br />
<br />
<br />
<br />
/var/log/messages has a dozens of dozens of these :<br />
<pre class="commands-codes">Apr 9 00:30:01 hostname kernel: arpresolve: can't allocate llinfo for 10.0.0.1
Apr 9 00:31:00 hostname kernel: arpresolve: can't allocate llinfo for 10.0.0.1
Apr 9 00:32:00 hostname last message repeated 15 times </pre><br />
It looks like connection from this server to machines within it's own segment is fine but other then that, all are unavailable. Another thing, machines connected before initiated from this server to it, is fine. Connections from other server within own segment to this server (if NOT initiated by this server before) still failed.<br />
<br />
After some googling, it seems like a patch is needed to fix this error : <br />
<a href="http://lists.freebsd.org/pipermail/freebsd-net/2011-August/029687.html">http://lists.freebsd.org/pipermail/freebsd-net/2011-August/029687.html</a><br />
<br />
Since the arp cache might be leaking and causes the table to be corrupted, a reboot is needed for the network stack to work. After reboot, the usual patching applies. <br />
<br />
The moral of the story, <a href="http://scratching.psybermonkey.net/2009/07/freebsd-how-to-upgrade-kernel-or-base.html">updating FreeBSD</a> is as important upgrading ports. :p<br />
<br />
<i>Ciao !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-53117823728030975812012-02-15T10:00:00.000+08:002012-05-11T14:03:29.792+08:00Scratch of the day - dmesg log is not at /var/log<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>dmesg log is the place where system information are written to it, similar to /var/log/messages. It is particularly useful to get information of Hardware details. But after some time, the information in /var/log/dmesg.today & /var/log/dmesg.yesterday are replaced with system messages where by boot messages are replaced. <br />
<br />
Fortunately, a copy of boot messages in dmesg are still available in :<br />
<br />
<pre class="commands-codes">/var/run/dmesg.boot</pre><br />
<i>Au revoir !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-77223664527147948002012-01-25T09:22:00.000+08:002012-05-11T14:03:22.558+08:00FreeBSD - Running Puppet on FreeBSD<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>The latest issue of <a href="http://bsdmag.org/">BSD Magazine</a> is out and guess what? It has an article that I've wrote on running <a href="http://bsdmag.org/magazine/1784-freebsd-get-up-to-date">Puppet on FreeBSD</a>!<br />
<br />
<a href="http://bsdmag.org/">BSD Magazine</a> is a free to download magazine that focus on BSD, be it FreeBSD, OpenBSD, NetBSD, PC-BSD and others. From BSDMag.org website :<br />
<br />
"<a href="http://bsdmag.org/about-the-magazine">We decided to create a magazine for BSD users, enthusiasts and communitites. There were lots of Linux magazines and none devoted to BSD systems. Does that mean Linux is better than BSD? Not at all!</a>"<br />
<br />
<br />
To <a href="http://bsdmag.org/downloads">download</a> a copy of the BSD Magazine, just register your email address with BSD Magazine and the download will be available. Spread the news, this magazine is full of BSD related news, tutorials, tips & tricks. <br />
<br />
The BSD community needs more of these valuable resource!<br />
<br />
<i>Ciao !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0tag:blogger.com,1999:blog-1304632214644526142.post-30505465451889545242012-01-09T16:00:00.000+08:002012-05-11T14:03:14.513+08:00Scratch of the day - Real time network statistic, like top<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png"></a></div>There's a sudden surge of network traffic in one of the servers and I need to find out what causes it. Roaming around ports show up this :<br>
<br>
<pre class="commands-codes">/usr/ports/net-mgmt/iftop</pre><br>
<blockquote>iftop does for network usage what top(1) does for CPU usage ...</blockquote>(<a href="http://www.ex-parrot.com/~pdw/iftop/">via</a>)<br>
<br>
To start monitoring :<br>
<a href="http://scratching.psybermonkey.net/2012/01/scratch-of-day-real-time-network.html#more">Read more »</a>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com1tag:blogger.com,1999:blog-1304632214644526142.post-56220977150407474292011-12-30T10:04:00.003+08:002012-01-03T10:42:30.981+08:00Scratch of the day - Back dated date<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgahP_7JfSF9Jj-RDl84SCRokirkrP0hrErWvTVdSrOY2j0LCbr_2uj-nMjB1vfTTOpK-WFsQBBZQZfuSIbeyPYktEHjRKu7oZ6IlB4b2ZhiCFOZ4hxV_NHZp6f6U-D3Cj5AtSvC6rNYS-a/s1600/bsd-daemon-logo.png" /></a></div>Did some <a href="http://scratching.psybermonkey.net/search/label/sysctl">sysctl</a> tuning and need to monitor the log file every "yesterday". This is what I've managed to split out from <a href="http://www.freebsd.org/cgi/man.cgi?query=strftime&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html">"strftime" manual</a> (via "<a href="http://www.freebsd.org/cgi/man.cgi?query=date&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html">date</a>") :<br />
<pre class="commands-codes"># date
Fri Dec 30 09:59:27 MYT 2011
# date -v -1d +%b\ %Oe
Dec 29</pre><br />
<br />
With this, make cron send me an email with filtered entries of /var/log/messages :<br />
<pre class="commands-codes">1 1 * * * grep "`date -v -1d +\%b\ \%Oe`" /var/log/messages | mail -s "Yesterday ..." root@example.com</pre><br />
<i>See ya !!!</i>PsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.com0