Sunday, 26 January 2014

Find Out Who's Eating Your Bandwidth With These Tips

A lot of things can drain away the capacity of that pipe that connects your computer to the Internet. It could be other people or devices on your network, or it could even be malicious applications or services running on the PC itself. The problem can get so bad that some people will toss out their computer and buy a new one.

» How To Access the Developer Options Menu and Enable USB Debugging on Android 4.2

In Android 4.2, the Developer Options menu and USB Debugging option have been hidden. If you need to enable USB Debugging, you can access the Developer Options menu with a quick trick.

LXC – Fast virtualization with Linux containers – X86 and ARM

St├ęphane Graber explains how to get started with linux containers on Ubuntu 12.04 here:-

Creating a basic container and starting it on Ubuntu 12.04 LTS is now down to:
  sudo apt-get install lxc  
sudo lxc-create -t ubuntu -n my-container  
sudo lxc-start -n my-container
I needed this, because the container name was wrong.
sudo cp -rf my-container/ my-cloud-container/
This will default to using the same version and architecture as your machine, additional option are obviously available (–help will list them). Login/Password are ubuntu/ubuntu.
Container shuts down when the running system is shut down with the "halt" command.
Shut down a crashed container with:-
sudo lxc-stop -n my-container-name
It's now possible to use qemu-user-static with LXC to run containers of non-native architectures, ARM for example:
 sudo apt-get install lxc qemu-user-static 
sudo lxc-create -t ubuntu -n p3 -- -a armhf
 sudo lxc-start -n p3 -d

sudo lxc-attach -n p3
Use the code below to test your ARM gcc compiler.
void main(void){
/* NOP */
asm ("mov r0, r0");
puts ("hello");
Save the code as test.c, compile with gcc test.c, and run with ./a.out.
It will put hello on the screen.

Saturday, 11 January 2014

Blogger dynamic views - remove sidebar menu to prevent different views

To remove the menu selector, go to template >> customise >> advanced >> add css , and paste the code into the window.
The full article is here

#header #views {
display: none;

#header #pages:before {
border-left: 0px;

#header #pages {
margin-left: 14px;

The tabs sometimes disappear and you have to reload the page several times to get them back, this is the fix:- Go to template>> edit html view, and right down at the bottom, find this bit of code, It will be set to 0, change it to 1000 like below.

setTimeout(function() {
}, 1000);
Here is an explanation:-

Code snippets in Dynamic views on blogger

Add the following code to the beginning of the <head> section in the blogger template
<script type="text/javascript"
Add the following code to the end of the <head> section in the blogger template
$(window.blogger.ui()).on('viewitem', function (event, post, element) {
element.each(function () {
// first argument is a callback function
// second argument is a root element or document to check
prettyPrint(null, this);
Then add <pre class="prettyprint"> to the beginning of a code section in the post, and close the code section with </pre> to get this:

/*Blink (Arduino)
Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain.

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second