Saturday, December 26, 2015

Google Translate Community

Google translate has a community to help them improve and add new languages, and they have a community for Kurdish language, I started contributing to it.

Google is one of the few big companies has cared about Kurdish language, and it is because Google cares about all kind of information it can classify. it is not motivated by governments or financial perspective, but rather to their obsession to collect and classify data.

This is one of those areas which my two big interests in life collide, Computers and Human languages.  Go Google Go !

Thursday, December 17, 2015

The Zen of Python: Complex is better than complicated

Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated...Read the full poem here


Wednesday, December 9, 2015

Pile of Garbage in android's Share To button and 3 suggestions

Recently I built an a dedicated media server using OpenElec  for my living room's TV. I can share videos from my phone to my TV way faster than my sloowwwww smart TV, which needs 20 seconds to load youtube app. not mentioning the awkward interface to control it.

So most of the times I share videos from android mobile phone to my media center through Yatse app. The problem is, each time I share from YouTube, I have to navigate through tens of apps to find the app I want to share with. in the list of possible apps to share with, I see a lot of irrelevant apps, many of them at the top of the list.

For example yelp, ...why would I ever want to share a youtube video on yelp ? I might in 10 years.
That makes me sad that I can not order the list or hide some of them I do NOT want to scroll down every time.

Here are my suggestions for future Android:

  1. Sort them by frequency and user behaviour, over last 10 times I shared 8 times with my Media center and 2 times with Gmail. have my media center at the top of the list and Gmail in second. 
  2. Sort them by relevancy if I sharing a phone number, makes more sense to share it with Contacts app than sharing it to Yelp !
  3. Give the user ability to hide some apps for when the developers are mean and not nice
Maybe android is getting too big of a community a lot of greedy developers are out there, producing garbage apps, Seriously developers be nice! I know you worked hard to make your app, don't shove it in all share menu, start-up service, and ask for all the possible android permissions...

It reminds me of old times when I used windows...every application which you installed would add its files to the root (C:\) . and also to ProgramFiles, and to start menu, and Deskop and Start-up folder, control panel ... you would end up with a pile of garbage.

We bloggers could also make it morally unacceptable for developers who try to shove their apps in every hole possible in android, just because they can !
Does Couchsuring app ever needs to be shown in share menu for YouTube? the sad truth is, it is on the share to list..

Simple rule of co-existence in eco-systems:
Develop in a way, that if everyone did that way, Android would still would be a pleasant OS to use.

P.S: Some people made apps to fix these issues called Andmade share worth a try but it didnt work for my Youtube spefic problem.

Monday, December 7, 2015

E-Prime: An improved version of English language

Compare these two sentences:

I liked the wikipedia article about e-prime.

vs 

The wikipedia article about e-prime was good !

The first sentence is written complied with e-prime, (not using to-be words) and second sentence is not e-prime.e-prime helps the reader not to confuse opinion with facts.

Sunday, November 29, 2015

Ideas for a better driving experience on Android

Suggestions bellow assumes you have a NFC tag where you mount your phone. I categorize the actions into two categorize, 1-when the phone is mounted ( assuming you are driving and your full attention should be on the road)  2- when the phone is not mounted ( assuming you grabbed your phone and you are not driving at the moment right now but you might very soon)


When the phone is mounted:
  • Suspend notification from other apps 
    • Except safety notifications  (a tornado is coming go back home)
    • I love to know I received a payment in my bank but not right now, maybe in 4 minutes when I am not driving?
    • No I do not want to know that thing needs to be updated right now! 
    • I don't even want to know I have 3 notifications to look at it later. I am too impatient when it comes to notifications, I wanna see them right away. it is better you don't tell me anything about notification at all while I am driving.
  • If navigation is app is in background, bring it up again. 
    • A common pattern I do that all the time that should be automated. I mount the phone, bring back the navigation to the front.
  • Mute the navigation if music is playing (or not based driver's preference)
    • I do NOT like you to interrupt my music to tell me 4 times I need to take that exit. I get it I know I have to take that exit...now just let me listen to my beautiful music.
  • Change the roate-lock the phone to preferred mode while navigating. 
    • I hate roated screens except when it shows me navigation or youtube videos.
    • Another pattern here, I keep enabling the auto rotate when I drive. and disable it back I am not driving. can we automate that please?

While phone is not mounted:
(assuming driver is not driving at the moment and grabbed the phone to look at it)
  • Unsuspend  notifications from other apps (Chats, Emails, Update Notification,...)
  • Minimized the navigation app and bring back whatever app was on before suspension.
  • Revert back rotation lock, to not rotate while not navigating. 
    • (or whatever the driver's preference is, for me I hate auto rotate all the way ! so disable it except for youtube and navigation)


Monday, November 9, 2015

Removing audio from a video in command line

I recorded our presentation on Chef in Oracle open world with two sound devices, and I needed to replace the video's audio with other one, one easy way is to remove the audio from the video and then merge it with another video. all in command line !

Quick handy tip :

ffmpeg -i Chef-Weblogic-Final-2.mp4 -vcodec copy -an Chef-Weblogic_nosound.mp4

Monday, October 5, 2015

How do I find parking spot in Chicago ? (aka Parking Meditation)

If you are in Chicago and you are on a waiting list for parking spot in your building, or you just have to park on the street, you got two ways to park!

Old School :
keep cursing around in every street near your place, till you find a parking spot.
it can take up to 40 minutes !


My Way:
Drive to the closets street , which you can park at both sides.
Find the first Towzone spot (or illegal to park spot), turn of your car, put your flashers on, wait for someone to leave their spot.

Meanwhile you can get out of your car, check on the car's vitals, oil level, tire pressure, check the suspension, clean the mirrors, clean the interior, check under the car for any possible leak...

This is also a great "me time". without any distraction from work or medias. think about your life and your ideas, what you like to do in the following weeks. you can even close your eyes for 2 minutes and not think about anything at all.

Advantages of my way:
-Your car won't be worn out,in first way you would need to break -a lot- and use more gas
-You do preventive care for your car, by checking the vital every now and then.
-You save the environment (a lil bit) and you wont make any new traffic for the city while cursing around !
-Replace frustration with relaxation, you won't get frustrated anytime a spot is too small or someone parked their car in a dumb way (that could have given you a space), or the moment you park happily you get out of the car and see a sign behind the trees that says you can't park here Thursdays 4P-6PM.
- Usually takes less time to find parking than keep cursing around in the neighbor hood. (in my experience someone leaves their spot every 15-20 minutes)


Happy parking folks !

Monday, September 28, 2015

Linux Log Tips !

Great summarize of  using linux tools (grep, tail, cut, awk,...) to analyze system logs.

http://www.loggly.com/ultimate-guide/analyzing-linux-logs/

Thursday, September 24, 2015

"Google Contributor" a win win project for content producers and consumers !

I started blogging about 13 years ago, like many other blogger, I took advantage of ads to get money. till one day AdBlocker extensions were invented for Firefox (and later chrome), that blocked the ads and thus the earnings for the bloggers.

I made a blog post to question, weather it is moral for people to block bloggers ads, which turned into a heating discussions over that times commenting ad-don systems (yep ! we used to install an addon on our blogs to have the luxury of comments)...

In all of my those comments everyone was in favor of ad blockers ! and were mad at me for even asking like what about the interests of the bloggers ? how else are they supposed to make money for spending time to create content ?

Many bloggers/producers wrote scripts that will block you seeing their content if you have an adblocker installed. (the most recent example is The Late show with Colbert Report on CBS)

Some of the angry people commented on my blog had a point, they didn't mind helping the content producer but they didn't wanna be annoyed by random ads ( in some cases even offensive ads ).

One solution was donation buttons, but there were downsides to it, you would have to do many donations to many bloggers, and so many more bills to manage, and donation amount was not relefictve of how much you use their content accurately .

After 13 years Google contributor project! answered my question beautifully !  the idea is you pay a monthly fee which will be paid to content producers, you will not see annoying ads on their contents !

Content producers win !
Content consumers win !

Wednesday, September 2, 2015

Presenting Chef at Openworld Conference

This year I will be co-presenting at the Oracle Open World in Francisco, the topic of our presentation is "WebLogic and Chef: a Recipe for Success [CON2276]"

Saturday, August 15, 2015

Squeaking sound is normal when parking brake is pulled !

Yesterday I changed my cars rear suspension with BMW's genuine parts, and to try it out, I pushed both rear sides down and disappointingly I heard squeaking sound, just like the previous worn out coil springs and strut shocks.

I learnt that It is a normal noise, if the parking brake is on !  I put the car in gear one and repeated the same test, no squealing sound at all, I should had checking my previous suspension to see if it makes squealing noise without the parking brake.

However it wouldn't make a difference in my decision to change my rear suspension.
Hope this help others don't do same mistake,

Wednesday, August 12, 2015

"if they take freedom out" Little Kurdish Poem by Sherko Bekas

If they take flower out of my poems,
One of my seasons** dies,

If they take lover out, 
Two of my seasons die,

If they take bread out
Three of my seasons die

If they take freedom out
all of my year dies and so will I myself.

Poem by Sherko Bekas
Translation from Kurdish, Medya Gh


** Season in Kurdish could refer to Seasons of the year and also chapters of a book. (like this book has 5 seasons, means this book has 5 chapters)

Tuesday, August 11, 2015

Melanie Martinez really talented young singer



Melanie Martinez had such an outstanding live performance at halsted fest in Chicago. A volcano of genuine emotions on the scene. I think we will see more of her in future.

Sunday, August 9, 2015

Once upon time we used to blog !

Once upon a time you had to buy your own hosting, choose and install a blogging platform and then start expressing your thoughts to the entire internet.without being have to share your name, your location, your gender, your mutual friends.

Soon it became one of the biggest headaches for many government, some bloggers were jailed or executed. I was living in one of those countries at the time.

I started blogging in 2001, with a blogging platform written in Perl, named GreyMatter, it was quite a DIY project. Later more advanced blogging platforms came, like MovableType.

I participated in developing and translating one of them to Kurdish language...unfortunately I don't even remember the name of that one... but it appears it has vanished from the surface of internet. (ah ...)

Later in the game, more and more people wanted to have blogs, Bigger companies offered us convince of blog as a service, no more backup, no more re-installing and re-uploading your images. 

Blogger provided such a great experience that I switched and I stayed till now and my favorite company of the time, Google bought it.

Today I was loading the blogger console on my chromebook, it took a lot of time to render the page. ( some really outdated crappy javascript was making the page load really slow) 
I look at the blogger console, the last time Google added anything here was adding G+ sharing feature. it feels so abandoned .

Nowadays less people take a lot of time and effort and even risk their life just to share their unfiltered thoughts with the world. everything we share is meant to be judged by our friends, mutual friends or even relatives.

Binding thoughts to identity, profile photo, location, gender, mutual friends, type of music you like, ... to me feels so imprisoning, expressing a new way of thinking has become harder. 

Is it just me, who thinks Auto Rotate is dumbest thing in Android?

During lifetime of android I have seen a lot of expected improvements, but I never seen anything on AutoRotate, and it seems to be annoying nobody else in the world, other than me.

Here is the thing, if you have a nice nexus tablet or a larger phone, and you laying down in bed, snuggling with your e-book, why do you need the screen to rotate and make your page have longer lines? almost any reader I know prefers reading in shorter length of line. it is faster and your eye gets tired less and you concentrate more.

The longer the lines, the more chance, your eyes get tried more trying to stay on the same line.
you might say, Dude just turn off the auto rotate. but NO ! I totally want to watch my youtube videos in in a rotated mode. or my navigation is so much nicer when it is rotated.

Auto rotate should be smarter, to differentiate if you are reading something or watching something.

Wednesday, August 5, 2015

Maintaining used cars is like software development!

Recently I rediscovered my love for used cars. I love used cars, they are like a spoiled baby, needy love and attention. It is a lot of fun to buy a used car and fixing it up. I can see a lot of resemblance between cars and my other passion software.

both are complex systems made of reusable components.
both need debugging to find out what went wrong.
both might need extending features (ex. adding bluetooth, usb charger)
and both entire goal is to serve you !

Sunday, July 26, 2015

Find the unused FM frequency for your FM transmitter

This site let you find best unused FM frequency by your zipcode
http://radio-locator.com/

It is a great starting point but I am not sure it is the most optimized, I am thinking of writing an app to find best of the best Frequency for your FM transmitter based on your current location.


p.s: did you know American wireless companies have disabled your FM sensors on your phone ? read more here http://freeradioonmyphone.org/

Friday, July 24, 2015

How to filter out items sold by Amazon.com ?

I had a $5 credit for choosing no-rush shipping for Tools and Home, Garden items.
but I couldn't make the credit happen for any item in my card,
The support told me the fine print says the item has to be sold by Amazon.com which is a bit confusing. because I am buying it from Amazon.com I am indeed not buying it from Ebay.com or Target.com So I asked the support how can I filter the items sold by amazon.com, they told me you can't really do that.

I found a small trick myself, just search for "soldbyamazon" in the search box.

Monday, June 22, 2015

Apple blocks Intel WiDi feature

All Intel CPUs come with WiDi feature (Wireless Display lets you mirror your screen to your smart TV) but apple blocks that hardware feature and makes you buy Apple TV.

I do NOT like that.

Thursday, June 18, 2015

"We used to allow duplicate usernames ..."

Today I got an email from Drupal.com asking me to change a user name I had created 8 years ago ! part of the email says :
"Since there is a duplicate with your name, the alias will not work and your page will not exist on Drupal.org if you try to visit ...
Can you please re-name yourself at https://..."

8 years ago ... duplicate usernames were okay ?

Saturday, April 11, 2015

Saturday, April 4, 2015

Hotel Internet smartly block hotel-booking website

Am I the first person in internet that noticed, Hotels complimentary internet, do no't load the search result from hotel booking websites ? (Ex. Kayak... )  You can visit any of those sites, but when you hit search it will say loading ... for ever . very sneaky way of making you buy directly from them !


Monday, March 30, 2015

Crontab -e tricks !

Make sure end the crontab file with a newline (known issue) to debug your crontab add somethign like this (the red color)

crontab -e

33 * * * * /home/medya/Apps/app1/run_all.sh > /tmp/crontab_ouptput 2> /tmp/crontab_error

Rails vs Django an In depth comparison

A must read
https://bernardopires.com/2014/03/rails-vs-django-an-in-depth-technical-comparison/

Saturday, March 28, 2015

Fresh Player instead of Flash player for firefox on ubuntu !

Never been a fan of adobe flash and always been a fan of Firefox, adobe flash has stopped releasing new versions for Linux . First of all tell your favorite app developers to stop using flash !!! secondly there is a workaround called Fresh Player. Adobe Flash you are ridiculous !

Tuesday, March 24, 2015

Putty color schemes

https://github.com/altercation/solarized/tree/master/putty-colors-solarized
Thanks for saving my eyes !

Eclipse dark all the way !

Thanks for saving my eyes First install -
https://github.com/guari/eclipse-ui-theme
Then install - http://marketplace.eclipse.org/content/eclipse-color-theme with this theme
https://github.com/guari/eclipse-ui-theme/blob/master/com.github.eclipseuitheme.themes.plugin/bin/color-scheme/RainbowDrops.xml?raw=true
stuff to change in menu
window/preferences/general/appearance/MoonrRise(standalone) window/preferences/general/appearance/Color Theme/
then import a theme

Tuesday, March 17, 2015

The weirdest password-less SSH problem in the world , "SELinux DAC vs MAC"

The past few days I havebanging my head to the wall, and bugged tens of people at work and stackoverflow asked them why passwordless ssh would work for one user and not for another user 

Here are weird issues :
  1. Password-less sssh works for users with a default user home location but not for the one with a custom location, (both would have same permission and keys)
  2. If I run the ssh server in in debug mode it works for both users perfectly fine !

I found the reason after lots of investigation, and the reason was SELinux's MAC ( mandatory access control ) turns out SELinux didn't allow accessing the public keys because the user's home folder was a symbolic link.


DAC (discretionary access control)
vs 
MAC (mandatory access control)


Dirty Workaround ?

echo 0 > /selinux/enforce

  • Turn off SELinux by : 
  • I also learnt how to pronounce the word discretionary "dəˈskreSHəˌnerē"


What is next ?

  • I need to study SELinux and so I don't have to do dirty work arounds !

Monday, March 16, 2015

How to run ssh-server in debug mode ?

/usr/sbin/sshd -d -p 22

Monday, February 23, 2015

Standard format for CHANGELOG

Today I started putting a changelog in the cookbooks I design and develop, I found this site useful for the standard format  http://keepachangelog.com/

Sunday, February 15, 2015

Bit of Scala for the weekend

This weekend I was trying to help a friend solve Scala probelm, I haven't touched scala since school, I helped him bascily by asking him bunch of questions ... I didnt know it myself, but I ask the right questions ...

I kept asking basic questions till we both learn it ! here is my code snippet to remember it for myself.


scala> val medyaconst : (Int,Int) => () => (Int, Int) = {  (a,b) => () => (a,b) }
medyaconst: (Int, Int) => () => (Int, Int) =

 try it in scalla shell

scala> val med1= medyaconst(13,26)
med1: () => (Int, Int) =

scala> med1
res0: () => (Int, Int) =

scala> med1()
res1: (Int, Int) = (13,26)
now trying a stateless counter:

val counter : Int => () => Int = 
{  x => { var n:Int = x; () => { val retVal = n; n = n + 1; retVal } }  }

Monday, February 9, 2015

get proccess ID based on keyword

really handy command in autmation
 pgrep -f weblogic

Tuesday, February 3, 2015

chef resource only if it is not a symbolic link

some_resource 'derp' do
only_if "test -d /derp/derp && -L /derp/derp" # is a dir and a symlink
only_if "test -d /derp/derp && ! -L /derp/derp" # is a dir and not a symlink
end

Related

Labels

computer (48) ubuntu (46) linux (28) tutorial (20) opinion (17) programming (14) software overview (13) terminal (12) troubleshooting (8) life (7) literature (7) poem (7) human languages (6) vim (6) bash (5) google (5) python (5) android (4) cars (4) phpBB (4) suggestion (4) tips (4) 12.04 (3) Chef (3) extension and addons (3) firefox (3) java (3) personal (3) russian (3) shell (3) windows (3) 64bit (2) Calligraphy (2) Chicago (2) Vagrant (2) apple (2) backup (2) bug (2) code (2) eclipse (2) funny (2) google chrome (2) idea (2) monitor (2) php (2) phpBB3 (2) shorter prompt (2) ssh (2) virtualbox (2) $_SERVER['REQUEST_URI'] (1) 2.7 (1) ALT+Backspace (1) AVR (1) Alt-Printscreen-K (1) AutoRotate (1) CTRL+ALT+DELETE (1) DRM (1) Debugging (1) Gimp (1) Gimp 2.8 (1) Microcontroler (1) Restart X (1) UML (1) Ventra (1) adsense (1) amazon (1) audio (1) aws (1) background process (1) battery (1) bing (1) blank (1) blogging (1) bmw (1) boot (1) business review (1) car (1) cd (1) chrome (1) comcast (1) computer kubuntu (1) conference (1) cookie (1) cron (1) database (1) date (1) display (1) domain name (1) download manager (1) dual boot (1) dual monitor (1) extensions (1) feature request (1) file (1) folder (1) freeze (1) gimp single window (1) git (1) gnome 3.10 (1) google docs (1) google plust (1) google+ (1) grep (1) icon (1) install (1) iterator (1) links (1) linu (1) linux links (1) list (1) mac os (1) media server (1) microsoft (1) moonlight (1) music (1) mysql (1) name (1) nautilus (1) netflix (1) notepad++ (1) parking (1) permission (1) philosophy (1) photo (1) prompt (1) protest (1) ps3mediaserver (1) putty (1) read from file (1) realtek (1) resolution (1) roku (1) samsung (1) scala (1) screenshot (1) security (1) selinux (1) server (1) skype (1) space (1) spam (1) spambot (1) sql (1) suspension (1) system monitor (1) tar (1) task manager (1) template design (1) th23 domain (1) thinking (1) ubuntu 13.10 (1) unity (1) vimrc (1) virtual machine (1) weblogic (1) wget (1) with space (1) xorg (1) xrand (1)