Posts

Showing posts with the label using

Boot an ISO Image using Grub2 or Install Ubuntu without needing a CD DVD or USB drive

Boot an ISO Image using Grub2 or Install Ubuntu without needing a CD DVD or USB drive Grub2 is capable of directly booting ISO images for many Linux distros if the entries have been properly defined in the Grub2 configuration files. What if you don't have access to a CD/DVD drive/disc or a USB drive and you want to install Ubuntu (or any other Linux)? Or if you want to perform some system maintenance tasks like those related to partitions or filesystems which can only be performed from within a Live CD environment? Grub2 comes in handy at that point as it would not only boot the ISO image from your HDD, but it would also let you perform an installation from the ISO image if you want to. Things You Need An existing install of Ubuntu (or any other Linux) with a working instance of Grub2. The desired ISO image that you want to boot/install. Procedure The ISO image can be placed virtually anywhere on your HDD but for the sake of simplicity, we would place it inside a new directory unde...

Boost System Performance RAM specifically in Ubuntu using zRam!

Image
Boost System Performance RAM specifically in Ubuntu using zRam! I gotta admit that apart from all the criticism, MS Windows Kernel is pretty good at managing memory and system resources. Although the GNU/Linux Kernel is certainly one of the most robust & highly secured ones out there, but sometimes I do feel a bit "sluggish" performance while the Memory gets filled and when its time to move the data between SWAP (virtual memory, a file, stored on or as a partition in GNU/Linux) to the RAM or vice versa when comparing with the Windows Kernel. What the heck is "SWAP"? If youre a bit new to all this hype :)... then SWAP is the temporary storage location that holds programs and other whatnots just before theyre loaded into your actual/physical RAM for execution. Anyhow, apparently there are few solutions for enhancing the performance and one in particular called zRam (successor of a project known as "Compcache", link below) thats integrated into the GNU/Li...

Boon 2x faster than Jackson at InputStream and not using index overlay

Boon 2x faster than Jackson at InputStream and not using index overlay Boon non-index overlay mode using inputstream 4 minutes ago  by  Richard Hightower This is with InputStream . According to Tatu comments InputStream is a use case that Boon could not compete in because boon is really just optimized for String. Tatu also said that Boon likely only wins because it uses index overlay. So here is a test that uses Boon without index overlay and uses  InputStream  not String. Benchmark Mode Thr Count Sec Mean Mean error Units MainBoonBenchmark.webxml thrpt 16 6 1 455347.925 46637.751 ops/s BoonClassicEagerNoLazyParse.webxml thrpt 16 6 1 401126.575 28331.138 ops/s JacksonASTBenchmark.webxml thrpt 16 6 1 233730.506 17868.136 ops/s MainJacksonObjectBenchmark.webxml thrpt 16 6 1 227287.992 21363.353 ops/s BoonReaderSource.webxml thrpt 16 6 1 216429.247 22538.238 ops/s BoonAsciiBenchMark.webxml thrpt 16 6 1 210416.450 10610.062 ops/s BoonUTF8BenchMark.webxml thrpt 16 6 1 19...

Blinking a LED using MPLAB X PIC16F877A

Image
Blinking a LED using MPLAB X PIC16F877A As all the programming lanugages start with a "Hello World" program ,but for a embeded programming its more fun if we start with an optical output 1.Start the MPLAB X IDE 2.Start new Project From the menu bar  or by  File ->New Project 3.A new window will appear , select Microchip Embedded from the category and Stand alone project from the Projects proced by clicking Next 4.Select the Device  Midrange 8 bit MCU from the family and PIC16F877A from the Device list 5.Next is selecting the Hardware tool ,select ICD 3 and proceed to Next 6 .Now select the compiler ,for PIC16F877A select Hi Tech PIC compiler 7.Now you are on new project page  create a new file by clicking on the menu bar or by File -> New File 8.Choose the file type : select  C  from the categories and C main file from the File types 9.Click next and take the source files from the left sidebar open the file by double clicking Write the C program code ...

Brave Browser Creates Ad Platform Using New Ethereum Token

Image
Brave Browser Creates Ad Platform Using New Ethereum Token The Brave internet browser has changed the way people around the world use the Internet by making made browsing faster and safer in addition to integrating Bitcoin�s peer-to-peer value to many new users and new wallets. Now, Brave takes another step into changing the online Internet experience by creating a new ad platform using a new digital token based on Ethereum technology. Brave is very focused on improving the online experience, and this new token-based system called BAT (Basic Attention Token) has multiple benefits for users, advertisers, and online publishers. Integrating BAT with blockchain technology ensures user anonymity and fairness while using Ethereum gives them experienced support from a market leader in smart contract technology. This is the second major partnership for Ethereum in as many months, following their announcement of the Enterprise Ethereum Alliance in New York a few weeks ago. Fortune 100 corpo...

Block P2P Traffic on a Cisco IOS Router using NBAR

Block P2P Traffic on a Cisco IOS Router using NBAR In the following example, well use NBAR to block P2P traffic on our routers Gigabit interface. Create a class-map to match the protocols to be blocked. Create a policy-map to specify what should be done with the traffic. Apply the policy to the user-facing (incoming) interface. conf t !--- IP CEF should be enabled at first to block P2P traffic. !--- P2P traffic cannot be blocked when IPC CEF is disabled. ip cef ! !--- Configure the class map named p2p to match the P2P protocols !--- to be blocked with this class map p2p. class-map match-any p2p !--- Mention the P2P protocols to be blocked in order to block the !--- P2P traffic flow between the required networks. edonkey, !--- fasttrack, gnutella, kazaa2, skype are some of the P2P !--- protocols used for P2P traffic flow. This example !--- blocks these protocols. ! match protocol edonkey match protocol fasttrack match protocol gnutella match protocol kazaa2 match protocol winmx match pr...

Boon JSON Custom object serializer now works with super classes and interfaces Example of using Guava HashCode

Boon JSON Custom object serializer now works with super classes and interfaces Example of using Guava HashCode related to https://github.com/RichardHightower/boon/issues/242 https://github.com/RichardHightower/boon/issues/231 Boon JSON: Custom object serializer works with super classes, and interfaces (and example of using HashCodeGuava).  Lets say you want to write a custom object serializer to work with Guava HashCode thingy or whatever else you need. public static String toJson ( Object obj ) { return createSerializer (). serialize ( obj ). toString (); } private static JsonSerializer createSerializer () { JsonSerializerFactory factory = new JsonSerializerFactory () . addTypeSerializer ( HashCode . class , new HashCodeSerializer () ); return factory . create (); } private static class HashCodeSerializer implements CustomObjectSerializer < HashCode > { @Override public Class < HashCode > type () { return HashCode . class ; } @...

Block ping request from a specific IP using iptables on Ubuntu 12 04 Tested

Block ping request from a specific IP using iptables on Ubuntu 12 04 Tested My Sever OS:Ubuntu 12.04 IP: 192.168.56.100 My Client OS:Ubuntu 13.04 IP 192.168.56.101 Task Block the ping request from client to server, so that when client ping the server, client should not get any reply. Solution Add the below rule in iptable of the server iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -s 192.168.56.101 -j DROP You have to specify the icmp-type as echo-request other wise the outgoing ping from server to client also will get blocked because when you ping client from server following happens :-ICMP echo-request is send to client :-ICMP echo-reply is send back from client to server(this get dropped if no icmp-type is indicated) Save rules in iptables permanently If you give iptables-save rules will be saved for the current session but will be gone once you reboot your machine. To save them permanently Open / etc/network/interfaces file vim /etc/network/interfaces Append the below...

Blender Game Engine aligning objects to standing surface using material settings

Image
Blender Game Engine aligning objects to standing surface using material settings When using Blender Game Engine there are several methods for aligning objects orientations to sitting surface. One such popular method is to use Ray sensor and Python codes to align objects. With newer Blender for Dynamics objects, it is actually possible to align objects just by using Physics settings in object�s Material tab to orient sitting objects without using any Python codes. To do that you have to change values in the Physics of Material tab of the surface object you want objects to be orient to, especially values of Force, Damp and Distance like shown below. And for objects which should be oriented you have to tick Rotate from Normal in the Physics tab. If all set your objects will follow the orientation of the surface. Check out the sample blend file to see how it works, press A and D keyboard keys to move the object. object_alignment.blend   Physics settings in the material tab