schrome – Simplified web page in chrome | web page without no bars

The script opens the link of a webpage in the form of the simplified Chrome app (without the url bar, bookmark and tabs) in a new windows. If you use a youtube link, it would use the _popup in the link to remove all distraction from the page (suggested videos, comments etc) and resized to fit the video. Just make sur the path to your chrome is the same as mine. To check just do ps -ax and if you have any chrome application running, the path will show.

# usage in linux command line: schrome https://www.youtube.com/watch?v=cU_m1OjeJ48
#!/bin/bash

if [[ $1 == *"youtube.com/watch"* ]]
then
 url=`echo $1 | sed -e 's/watch/watch_popup/g'`;
else
 url=$1;
fi

echo $url;

/opt/google/chrome/chrome --new-window --app=$url

 

youtube

Changing ROM on Android phone using ADB with linux

Installing different OS on a PC is easy, get a CD, boot from it and just follow the wizard. How about your phone? Manufacturers and service providers don’t like when you mess with your phone OS (which is really called the ROM). The reality though, is that the cell phones today are more than just phones. Changing the ROM on your phone was always possible with most manufacturers but not always easy, with reason I must say. It is really bad when you cannot take a call or get your messages correctly on time on your work phone, because you nightly build you installed on your work phone has a bug and you have no idea when it will be fixed (or if it will). I rooted and installed Cyanogenmod on my first Android phone (Samsung S in 2009) using Odin within a few weeks I received it. I’ve always been a (satisfied) Samsung Android user and did the same with all the following phones I had except the last one. I figured I should have one fully functional phone at least once in my career. That said, I have a Galaxy Nexus phone (from 2011) that I get to play with. Having always used Odin (on Windows), that was the only way I knew how to push an image to an Android phone, whether its the ROM or ClockWorkMod ( cwm, is a recovery boot partition that can be used to install ROM and APPs in form of zip files on the SDCard). Of course, we’ve all heard about the Android being an open architecture with all kinds of programming tools (Java.. Uurrgg). At this point, I heard of adb (Android Debug Bridge) tool from a colleague but never really spent the time to investigate it.

So, yesterday I decided to see if there were any update for the Galaxy Nexus running Cyanogenmod. There was and when I did the update, the phone would boot into CWM and say it couldn’t find the autodeploy.zip file and get stuck. I tried to restart, clear the cache, wipe the device but nothing to do. I didn’t had the ROM on the sdcard to reinstall it. Since, the sd card is not actually an external sdcard in a slot (like all Samsung Ss) and there is no Odin for Galaxy Nexus, i had to find a way to load a new ROM into the phone. To be clear, I wasn’t the last person who flashed that phone. Since I’m very much into linux now, I thought “time to try adb!”. If you are a linux poweruser, you’ll probably know that thrills of learning a command line that can make something extremely tedious into something so simple that you question your whole existence.. Well, adb does that!!

I started here and understood that there’s really two pieces to it. Read more [+]

Windows 10

If you’ve read my other posts, you’ll know that I’m a converted avid linux (power) user since a few years now. Personally, I thought Windows 8 was great step for microsoft. They were bold and had the guts to take the chance and bring something really different at a time where people thought that the tablets were gonna replace the desktop. That didn’t happen, people complained for just about everything with the OS. When they tried a step back with 8.1, they had serious issues with the platform. Well, you cannot please everybody. Skipping Windows 9 to Windows 10, Microsoft really came back in force with its desktop enhanced environment with the proper twists in functionalities to take full advantage of the touch screen and not mimick a tablet. Honestly, I think the tablet era will go as quickly as it gain popularity and will become a niche market.

For my part, I customized my Windows 10 Surface Pro (first gen) to fit my work style of linux with windows. (At work, I have a desktop with Linux running Windows 7 in a virtual box.). First thing was to install Chrome. Let’s be honest, Microsoft Edge is way behind in functionalities and IE is just for backward compatibility for older websites. Edge is clean and has potentials, but no way near what Chrome offers today. Cortana is not available in my region and honestly I don’t really care. I get the idea of talking to your device to get faster answers but I still believe that google has a better search engine and if I’m really in a hurry, I’ll grab my phone, not boot my PC. I can type faster on my desktop than wait for the text conversion and search. I also removed the search bar all together. I can’t find the use for it. I know where I keep my stuff (Documents) and Google is my default web page, why then do I need a search bar? The adresse bar (tool bar) is the really useful one. You can executes command directly in the bar without the “right click bottom left corner and Execute”. Specially when your Windows stops responding (still happens, no surprise, no complaints).. « shutdown /s ». Read more [+]

How to Quickly Resize, Convert & Modify Images from the Linux Terminal

Converting image is very useful when blogging, found this and love it..

How to Quickly Resize, Convert & Modify Images from the Linux Terminal.

ImageMagick will try to preserve the aspect ratio if you use this command. It will alter the image to fit within a 200×100 area, but the image may not be exactly 200×100. If you want to force the image to become a specific size – even if it messes up the aspect ratio – add an exclamation point to the dimensions:

convert example.png -resize 200×100! example.png

Media Server (and more) under linux

Been a while since I wanted to change the pc acting as media server under my tv into a linux machine. It was doing quite well as a Windows 7 machine except for the frequent updates and reboots and all the 3rd party software required to get it to work like I wanted. The Acer AspireRevo R3610 Nettop PC was a great option 4 years back, with an Atom 330 processor, and 2 GB ram, its starting to lag in performance and it was time to turn to linux. So my wish list of applications were as follows:

  1. File Sharing
  2. Printer sharing
  3. Remote connexion (VNC or NoMachine)
  4. Prayer time (Islamic)
  5. btsync (backup)
  6. utorrent (just in case 🙂
  7. Xbmc (will rename Kodi soon)

Read more [+]

Ace Stream on Ubuntu 14.04

Wish acestream would keep up with the ubuntu upgrades, gotta love the open source community.. Thanks AhMek for this.. http://ahmek.wordpress.com/wp-comments-post.php

 

ACE-logo

Installing Gnome 3 desktop to Ubuntu 14.04

gnome-logo

sudo apt-get update && sudo apt-get install gnome-shell ubuntu-gnome-desktop

Exiftool bash scripting

bash

With piles of photos dumped over the years on CDs and DVDs, I needed to organize them back on a Disk drive for ease of access and sharing with family. This little script reads the exif info on the JPG files in the current folder and subfolders and move them (with their paths) under a folder named the year it was taken. (The year is assumed and provided as an argument). All in Linux of course..

ex. ./organizephotos 2005

#/bin/bash

year=$1 
x=0
for f in `find . -name "*.JPG"`; do
((x++))

echo $x
#echo "mv $f ./$year${f#*.}"
nf=./$year${f#*.}
#echo `dirname $nf`

 if [ -n "`exiftool -DateTimeOriginal $f | grep $year`" ]; then

  if [ ! -d `dirname $nf` ]; then 
	echo "Creating path `dirname $nf`"
 	mkdir -p `dirname $nf`
  fi 
 	mv $f `dirname $nf`
  fi

done

Connecting to remote Windows 8 … CLI!!! (powershell)

powershell

Well, first get an SSH server on the machine. On one of my previous post I wrote about FreeSSHd, didn’t work so well with my Windows 8 machine. I’m now using Bitvise works great, and gives you a clean window. I am not use yet if I want to buy it, so I stayed with the standard version. The limitation with that is I can’t login as a domain user. I tried Get-Credential so I could pass it on New-PSsession and start a powershell session with a domain user. Well, not that easy.. Get-Credential pops up a credential window and there’s no option to pass the password in the cli. This means, remotely (or in a script).. not gonna work! not smart!!. There’s a couple of tricks to get this going but all without a few long commands. Easiest way is as follows:

Read more [+]

Lighttpd+mod_rewrite+WordPress (3.4.2)

 

Lighttpd

Ok people, that was NOT easy.. I really wish WordPress would generate a list of rewrite for Lighttpd as it does for Apache when you activate Multisite. That would have been such a gain in time. But I can understand that unlike just throwing a .htaccess files in the folder of your site, modifying lighttpd.conf is a bigger deal and you need to know what you are doing..

I have WordPress Multisite and MediaWiki running on the same server in different subdirectories:
www.amagob.com/wpmu  =­> WordPress MU => /var/www/wpmu
www.amagob.com/wiki   => MediaWiki => /var/www/wiki
Using Apache, all I had to do was to put the .htaccess inside the wpmu folder and all my “re-writes” would work without affecting the wiki. Not a suggested config from WordPress but then again if you were to follow the instructions, you should be running only wordpress on a dedicated webserver. The url-rewrites affect everything. You should also be using your root domain as the main url (amagob.com). Not me, I don’t have unlimited server power. I also have other servers running in VM using other subdomain names. (For that Lighttpd is great as reverse proxy as well.)

Read more [+]