Saturday, November 19, 2016

Orange PI Plus 2 with Arch Linux Minimal



ArchLinux_Minimal.img                            Arch Linux basic image (without Desktop GUI)

Download ArchLinux_Minimal.img from https://drive.google.com/drive/folders/0B1hyW7T0dqn6fndnZTRhRm5BaW4zVDVyTGlGMWJES3Z1eXVDQzI5R1lnV21oRHFsWnVwSEU


Installation on SD Card


  • Download any of the available images (xz archive) from Mega or GoogleDrive
  • Download scriptbin_kernel.tar.gz, it contains the latest kernel (uImage) and script.bin
  • Unpack the archive.
  • Write the xxx.img file (disk image) to your SD Card
  • on Linux use dd command ( sudo dd if=image_name.img of=/dev/sdX bs=1M oflag=direct )
  • on Windows use disk image writing software such as Win32 Disk Imager
  • After writing the image, mount SD Card FAT partition (BOOT)
  • Copy uImage_OPI-2 or uImage_OPI-PLUS (depending on your board type) to uImage (for OPI-PC use uImage_OPI-2)
  • Copy one of the script.bin.OPI-XXXX (depending on your board type and desired monitor resolution) to script.bin
  • use uImage_OPI-XX and script.bin.OPI-XXXX from scriptbin_kernel.tar.gz if it is newer (probably it is).
  • Boot your Orange PI board from SD Card


Installation on internal EMMC


  • Install the image on SD Card as described above
  • Boot your Orange PI board from SD Card
  • Run:
    1. sudo install_to_emmc
    Copy the Code

  • Power off the board.
  • Remove SD Card
  • Power on, the board will boot from EMMC

1) First connect to internet via the LAN cable
2) try `sudo pacman -Syu` to fetch the updated installation urls. Hit NO when asked to install update packages.
3) Now do `sudo pacman -S parted dosfstools` to install the partitioning pr the disk packages
4) Now you can do `sudo install_to_emmc` .... have fun ....


Setting up WiFi


wifi-menu -o

# netctl start profile 
then it can be enabled using:
# netctl enable profile
This will create and enable a systemd service that will start when the computer boots. Changes to the profile file will not propagate to the service file automatically. After such changes, it is necessary to reenable the profile:
# netctl reenable profile


If you see network profile aleady up, do
ip link wlan0 down

then do
netctl start wireless-wpa

Wednesday, August 17, 2016

Innovations in demand or needed badly

1) Flood survival kit - Like below, need a kit to help survive floods

2) Building/ apartment on fire escape kit -- http://www.dailymail.co.uk/sciencetech/article-3192161/SkySaver-backpack-lets-ABSEIL-multi-storey-buildings-escape-fires.html#v-4410962511001

Todo - Shortly need to create a post on change.org to pledge governments to provide these/ similar kits to the residents as it can come handy during the disaster.

3) Tornado survival kit - Like above, need a kit to help survive tornado

4) Tsunami survival kit - Like above, need a kit to help survive tsunamis

5) Earthquake survival kit - Like above, need a kit to help survive earthquakes

6) Frost bite survival kit - Like above, need a kit to help survive frost bites

7) War survival kit - Like above, need a kit to help survive wars

Sunday, August 7, 2016

BC Stop Sign

Types of STOP signs and rules to follow.

*Basic rule for any STOP sign is to stop in a STOP sign before the white line for 3 seconds (the rule) and move if there is no pedestrian crossing in front of you and accordingly depending on the type of the sign as mentioned below.

1) Two way or one way STOP sign
is one where you and the driver from the opposite side would be facing. Follow the *basic rule like said above and then say

a) Turning Right
If you plan to turn right and if there is a vehicle already if waiting in the opposite direction, then he has the preference to go first. In case he's blocked by traffic then, you get the preference to proceed. Make sure that there is no traffic coming from the left side in the lane* you want to turn or you think you can merge (comes with experience). You do this which is known as left shoulder check. Then slowly move with turn and merge into the lane provided you didn't see any objects by doing the right shoulder check too. If there is curb before the intersection you should have stopped before the curb and slowly move to merge to make right turn.

b) Turning Left
If you plan to turn left (tougher one) , again the vehicle already if waiting in the opposite direction, has the preference to go first. If you are first, then make sure first there is no traffic from left by left shoulder check. Then check no traffic again from right by right shoulder check. Now slowly move your vehicle if all is clear and turn into the immediate 1st lane after the turn nd slowly spped up to the speed limits (usually 50 Kmph)

2)  Three way or four way STOP sign
This one is a lot easier and safer one then the two or the one way STOP sign, provided all in the intersection are following the rules.
Irrespective of turning left or right, the basic idea is that all the vehicles come to a STOP and follow the *basic rule. The vehicle which came first gets to go first in whichever direction provided the intersection is clear. If two or more of them came almost at the same time, then person in the left has to let the person in the right make the turn. This can however be confusing for a new or experienced drivers too. So the best bet is to slowly start moving your vehicle and stop immediately if anyone else jumped the gun to avoid the crash.

DISCLAIMER: PLEASE NOTE THAT ALL THE INFORMATION PROVIDED HERE IS FOR LEARNING PURPOSE ONLY WITH TIPS AND IDEAS BUT SHOULD ANYWAY CONSULT WITH THE LOCAL LAWS TO CONFIRM THE SAME.

Monday, July 11, 2016

Drupal 7 Views field customization

Lets say you have a drupal 7 installation with Views enabled. Now you have a view for a products page or a block. Lets say you are not happy with the the fonts, the position or any front end related to the field. How do you overcome this situation. One way is to theme the particular field.

1) In the view, for the field go to the style settings,
a. select customize field HTML
b. select the HTML element like say 'DIV' in this case. Lookup for each and what they mean.
c. select create a CSS class and give it a name say, 'product_title'
d. Finally hit apply. We are done with the ui side of the setup.

2) Now, lets try to customize the field class we defined above for class name 'product_title'
a. You can either pass the full CSS path like below to be specific or the actual element itself making it like more global like.
b. Open you CSS which could be your_theme/css/style.css and add like below.
div.product_title,
.product_title {
align_text: center,
font-size: 1.145em
}


Thursday, April 28, 2016

Orange Pi Plus 2 LAN setup


Update the below file
`sudo nano /etc/network/interfaces`

to look like below
`auto eth0 
iface eth0 inet dhcp`

Then finally do like below
`sudo /etc/init.d/networking restart`

To manually update your ip, do like below
`ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up`

 I connected my pi to a Mac book pro via LAN. The Mac book was set to share its internet connection. Make sure the thunderbird is green on the Network setings.

Then you can do like below to install xfce desktop

`sudo install_xfce_desktop`

Browser background color or monitor brightness

Have you been in a situation where you are almost sitting the whole day in front of your browser and going through a document and find that ...