Posts Tagged ‘yesterday’

Linux: List last 10 (newest) and 10 oldest modified files in a directory with ls

Tuesday, April 8th, 2014

An useful thing on GNU / Linux sometimes is to list last or oldest modified files in directory.

Lets say you want to list last 10 modified files with ls from today / yesterday. Here is how:
 

ls -1t | head -10
my.cnf
wordperss_enabled_plugins.txt
newcerts/
mysql-hipo_pcfreakbiz.dump
NewArchive-Jan-10-15.zip
hipo_pcfreakbiz-mysqldb-any-out-1389361234.tgz
Tisho_Snimki/
wordpress/
wp-cron.php?doing_wp_cron=1.1
wp-cron.php

 

To list 10 oldest modified files on Linux:

 

ls -1t | tail -10
    my.cnf
    pcfreak_sql-15_10_05_2012
    mysql-tuning-primer*
    tuning-primer.sh*
    system-administration-services.html
    blog_backup_15_07_2012.tar.gz
    www-files/
    dump.sql
    courier-imap*
    djbdns-1.05.tar.gz


Cheers 😉

Run 2 and more Skypes simultaneously on Mac OS X – Run multiple Skype acccounts on same Mac

Saturday, June 21st, 2014

run-2-and-more-skypes-simultaneously-on-mac-os-x-multiple-skype-account-login-on-mac
For people running Mac OS X, the question of 
how is it possible to use 2 skype accounts in parallel on Mac probably makes good sense?

I don't own a Mac notebook and thefore I'm a Mac newbie, however, I'm into situation where I and my wife Svetlana went (for 3 days) to my hometown Dobrich and we have with us only her Mac OS X powered Mac Book air.

 

One user is already logged in Skype, (my wife) is expecting some relatives and friends to contact us and  same time I had to login to check few servers via ssh and discuss some server downtime issues from yesterday in Skype .
Thus we
need 2 skype instances to run separately on her Macbook air powered PC with Mac OS X Leopard
 

Earlier I've blogged how to make 2 and more Skype accounts work simultaneously on one Windows PC because I had to set it up for a company, in this short article I will explain how is possible to run many skype clients on Mac OS X.

 

1. Open Mac Terminal from Finder

finder-terminal-screenshot-mac-os-x-leopard-run-many-skypes-mac-os

2. In Terminal run the first Skype Instance

Type in Terminal:

open /Applications/Skype.app/Contents/MacOS/Skype

3. Run Second Skype instance

In older Skype Mac OS versions, I read the

/secondary

Skype command option was there and could be used to run a second parallel skype instance on Mac, however in newer releases this option was removed and if you try to invoke it warning window pops up saying an instance is already running.

mac-os-x-you-have-another-copy-of-skype-running-screenshot

To get around the issue and run the second Skype, quickest way is to run another Skype client under privileged user through sudo command (this is unsecure – but anyways as Mac OS is proprietary and we don't have access to code and probably there are tons of spy and report software integrated into the OS, it doesn't really matter.)

mac-os-x-skype-run-screenshot-pic

To get around the issue and run the second Skype, quickest way is to run another Skype client under privileged user through sudo command (this is unsecure – but anyways as Mac OS is proprietary and we don't have access to code and probably there are tons of spy and report software integrated into the OS, it doesn't really matter.)

4. Script it into 2nd_skype.sh for later use

To run and use two parallel skypes regularly it might be useful to make shell script out of it and place it somewhere, 2nd_skype.sh script should be something like:


#!/bin/bash
open /Applications/Skype.app/Contents/MacOS/Skype
sudo /Applications/Skype.app/Contents/MacOS/Skype

Then make the script executable with:

chmod a+x 2nd_skype.sh

5. Run more than 2 Skypes (Run multiple Skypes on same Mac PC hack)

There is another "hack" method with deleting the Skype.pid (Process ID). Skype recognize where it is running by checking its Skype.pid on start up.

Deleting the pid after each next Skype client launch,  allow the user to run as many Skypes as you want on Mac OS X but it is not clear for how long it time it will work.

rm -f ~/Library/Application Support/Skype/Skype.pid

Then launch again Skype in background from Mac Terminal

open -nW '/Application/Skype.app' &

In case if you wonder why the open command is used, since above line could be run also directly and Skype will pop-up, by using open command you instruct the program to detach itself from Terminal from which it run, so later if Terminal is closed Skype app. will not terminate.

Another approach is to create, a many users lets say 5 users and use the Skype sudo run method each client with a separate user.

sudo user1 /Applications/Skype.app/Contents/MacOS/Skype
sudo user2 /Applications/Skype.app/Contents/MacOS/Skype
sudo user3 /Applications/Skype.app/Contents/MacOS/Skype
sudo user4 /Applications/Skype.app/Contents/MacOS/Skype

sudo user5 /Applications/Skype.app/Contents/MacOS/Skype

I enclose the script with the custom icon (Skype) ready to be launched and Voila, on script launch Skype multiple login prompts pops up.

For the lazy ones who don't want to tamper with writting scripts or doing hacks to run Skype multiple times on Mac there is even a Multi Skype Launcher app for Mac.

 


 

How to run your Own / Personal Domain Web WHOIS service in a minute with SpeedyWHOIS

Thursday, April 5th, 2012

Running your own personal WHOIS service speedy whois in browser screenshot

I've been planning to run my own domain WHOIS service, for quite sime time and I always postpone or forgot to do it.
If you wonder, why would I need a (personal) web whois service, well it is way easier to use and remember for future use reference if you run it on your own URL, than wasting time in search for a whois service in google and then using some other's service to get just a simple DOMAIN WHOIS info.

So back to my post topic, I postpopned and postponed to run my own web whois, just until  yesterday, whether I have remembered about my idea to have my own whois up and running and proceeded wtih it.

To achieve my goal I checked if there is free software or (open source) software that easily does this.
I know I can write one for me from scratch, but since it would have cost me some at least a week of programming and testing and I didn't wanted to go this way.

To check if someone had already made an easy to install web whois service, I looked through in the "ultimate source for free software" sourceforge.net

Looking for the "whois web service" keywords, displayed few projects on top. But unfortunately many of the projects sources was not available anymore from http://sf.net and the project developers pages..
Thanksfully in a while, I found a project called SpeedyWhois, which PHP source was available for download.

With all prior said about project missing sources, Just in case if SpeedyWhois source  disappears in the future (like it probably) happened with, some of the other WHOIS web service projects, I've made SpeedyWhois  mirror for download here

 
Contrary to my idea that installing the web whois service might be a "pain in the ass", (like is the case  with so many free software php scripts and apps) – the installation went quite smoothly.
 
To install it I took the following 4 steps:
 
1. Download the source (zip archive) with wget 
 
# cd /var/www/whois-service;
/var/www/whois-service# wget -q https://www.pc-freak.net/files/speedywhois-0.1.4.zip
 
2. Unarchive it with unzip command 
 
 
/var/www/whois-service# unzip speedywhois-0.1.4.zip
3. Set the proper DNS records

My NS are using Godaddy, so I set my desired subdomain record from their domain name manager.
 

4. Edit Apache httpd.conf to create VirtualHost
 
This step is not mandatory, but I thought it is nice if I put the whois service under a subdomain, so add a VirtualHost to my httpd.conf
 
The Virtualhost Apache directives, I used are:
 
<VirtualHost *:80>
        ServerAdmin hipo_aT_www.pc-freak.net
        DocumentRoot /var/www/whois-service
        ServerName whois.www.pc-freak.net
        &lt;Directory /var/www/whois-service
        AllowOverride All
        Order Allow,Deny
        Allow from All
        </Directory>
</VirtualHost>
 
Onwards to take effect of new Webserver configs, I did Apache restart
 
# /usr/local/etc/rc.d/apache2 restart
 
Further on You can test whois a domain using my new installed SpeedyWHOISWeb WHOIS service  on http://whois.www.pc-freak.net
Whenever I have some free time, maybe I will work on the code, to try to add support for logging of previous whois requests and posting links pointing to the previous whois done via the web WHOIS service on the main whois page.
 
One thing that I disliked about how SpeedyWHOIS is written is, if there is no WHOIS information returned for a domain request (e.g.) a:
 
# whois domainname.com
 
returns an empty information, the script doesn't warn with a message there is no WHOIS data available for this domain or something.
 
 
This is not so important as this kind of behaviour of 'error' handling can easily be changed with minimum changes in the php code.
If you wonder, why do I need the web whois service, the answer is it is way easier to use.
I don't have more time to research a bit further on the alternative open source web whois services, so I would be glad to hear from anyone who tested other web whois service that is free comes under a FOSS license.
In the mean time, I'm sure people with a small internet websites like mine who are looking to run their OWN (personal) whois service SpeedyWHOIS does a great job.

The New Year

Thursday, January 3rd, 2008

I’m still up here. On the New Year’s eve I was on a party more than 35 ppl were there. All kind of ppls fromMetalheads to Hip Hop maniacs, (ganja addicted) and ofcourse Ja (Rasta) fans. Almost the whole days Iplayed Dune 2 (Great Game, I play with Harkonen :)). The New Year was normal. Nomen bringed a winewhich costs 100.3 lv, the wine was good. Around this celebrities I started eating a lot and I’m on a wayto get fat. BTC are terrible we don’t have internet in the office now for almost 24 hours. This Winteris fierce. There are snowstorms around, and we even have a water regime. Yesterday I was out on a coffeewith Lily :), it’s a good thing that she is around.END—–

The week

Tuesday, January 8th, 2008

After 10 minutes I’ll have Deutcsh lessons anyways I’ve caught some winter virus :)I’m having snots coughing and stuff. In Sunday I was on a Liturgy in the Church as usual.Yesterday was a quiet and peaceful day. Static came home and we installed Windows. NowI have Windows,Linux,FreeBSD on one machine. I’m surprised how well is Windows working.I’m eating a lot of garlic recently to stimulate my immune system. Yesterday I playedsome Warcraft III. Having Windows now gives me the opportunity to play some gameswhich weren’t working in wine. Well that’s most of how my day passed. I went to seemy grandma and she made me tea as always (her tea is awesome!). :)END—–

Friday Night

Sunday, January 20th, 2008

At Friday I, Zuio and Kiro (Kumcho Vylcho :). Went in the central park with a bottle of wine and 2l of beer. After the alcoholwas depleted Zuio suggested to buy 2 more bottles of wine. And we got very drunk it’s a miracle we are now fine.Yeterday I had a terrible headache. Yesterday I was on a birthday of Andon (Blackstar^) :). Tomorrow I haveexam in HRQM. I haven’t seriously studied yet. So I had to sit on my back and study.END—–

Knowing Not! :]

Monday, January 22nd, 2007

Today I have Marketing exam. Ofcourse as usual when I have exams I haven’t studied enough, and again I’m in the situation realizing I don’t know anything. I depend 100% on God’s grace to take that exam. Why I’m so dumb never study when

I have what I have. I can’t change my self I can’t study something I’m not interested into. Marketing is a subject which is simple but for Jerks IMHO :]. The logic of marketing is too abstract.

And yes what’s happening with me the last days. Well I’m feeling good now Praise the Lord. I’ve no idea what I should do with my life. I have 2 re-exams for now or maybe 3 ( I don’t know the results from the Research & Statistics Exam ).

The last few days I ran FreeDOS and Windows 2000 Pro SP4 under FreeBSD 6.2 with qemu. FreeDOS’s performance is very nice despite the fact it is emulated. The Windows is running a little laggish although I ran it with kqemu ( Experimental Module for qemu which enhances the typical qemu speed ). Yesterday we drink a dark beer with Nomen into the “Happy Person” Pub. My passion for computers is starting to come back again.

Looser Again

Wednesday, January 31st, 2007

Got the 2 mark on Marketing Exam. Again I’m a looser. I dont’ have nor time nor desire to learn again for this exam.I think I’m not suitable for student. Today we was on a coffee with Mitko, Toto and Dido. Nothing special ordinary day.Yesterday we stayed in Mitko and was installing Gentoo Linux to his laptop. Gentoo’s grub was buggy or something,we didn’t succeeded running the kernel with GRUB, so we decided to switch to LILO. We were able to makethe maching bootable using LILO. Then there was an annying error with REAL_ROOT option. After a lot of wanderingediting of /linuxrc we found the mistake it was a mismatch in lilo a mistake we made writing in it we wrote therereal_boot instead of real_root. In the end everything worked okay. And I went home sleeping.I’m not sure where my life is going to again … I’m completely Lost in the Dark.END—–

The Beggar …

Friday, June 22nd, 2007

It’s such a pain into my heart. Yesterday I and Mitko was walking down to see how is in Mino’s coffeewhen we met a beggar actually I have seen this man a lot of times he is 37 … now he even broke hisarm. It hurts when I remember him. We talked a little with him and as I understand he is a ProtestantChristian … he is so young and It hurts I really hope God Almighty would do something for this man… he is an alcoholic, but in everything he speaks he is searching for truth .. He told me a partof his story he used to have a family and children but his wife divorced him and 2003 or 2004 andtook him everything he has since then he is on the street. For 3 years he is looking like an old anddying man he said he sleeps under a balcony and even when he gains some money begging there areguys who came and rob him … Today he said he haven’t eat food for 2 days and he is still not hungry ..I tried to speak with him telling him God can get him out of living on the street but he said healso wants but it’s not God’s will to have a living place I hope this is not true.I really Pray and Beg to God and hope the Lord would have mercy over this man.END—–

Thanks to God, yesterday I had a great day

Thursday, June 28th, 2007

Yesterday was a good day in general. Ofcourse as ever thanks to God. The day before yesterday I was feelingbad and I prayed asking of God something to become happening in my life. Yesterday Pro-XeX called and we drinked a coffee on The Fountain coffee with him and Amridikon. I received only one call from the Office for the whole day and later Bino an old friend come home and was my guest for few hours, in the evening, we met with Nomen and we decided we would watch a film on the Cinema. The Film that was projected wascalled “The Pirates of Carribbean Sea“, the film was empty of meaning just a tale I wasn’t able to get mostof the conceptions of the film it was just things happening all around the film an action happenning with some elements of humour. After that I send Nomen to his home and went home. I prayed with the Evening Orthodox Prayers as usual and as usual after that prayed with my own prayer for people I wish that God would give a hand. Today I red about the living of a saint Seraphim Sarov who used to live in russia. His life story is quite interesting, His teaching of the purpose of a Christian was absolutely truthful,  what he said in his teaching was something I was all the time knowing. He said the Purpose of a Christian life is to be fulfilled and with the Holy Spirit staying in The Body of Christ Jesus, great truth, I read a documented conversation between the saint and an ordinary Russian citizen, st. Seraphim Sarov explained in this conversation how to recognize if we are fulfilled with the Holy Spirit and through this in Jesus Christ body. His explanation was something which I also know from experience so I know this saint is speaking of a Truth. When I was reading his documented with his speech I was feeling the presence of God so near. And was feeling exactly what st. Seraphim said a man feels in the Presence of The Holy Trinity!

Praise be to God Almighty!