spacer
spacer

Recent Photos
spacer spacer spacer spacer spacer
Latest Commits
started watching jdscheff/basketball-gmstarted following digiboforked jsfiddle/jsfiddle-docs-alphapushed to master at PeEllAvaj/SocketCLientmerged pull request 1 on PeEllAvaj/SocketCLientpushed to master at PeEllAvaj/SocketCLientcreated branch master at PeEllAvaj/SocketCLient

Chromium Experiments with Fresh New Tab Layout

by PeEll 2011.08.18

A drastic change to the New Tab layout has landed in the chromium nightlies. The fresh New Tab layout has moved away from the vertically stacked Most Visited, Apps, and Bookmarks. The layout now uses a new bottom bar to allow easy navigation to these elements. It also allows you to click on right and left arrows to move between them, similar to a smartphone or tablet layout.

spacer
comments | permalink

Optimize PNG images with OptiPNG

by PeEll 2011.08.17

PNG is a great free lossless, compressed image format. One thing that may surprise you is that PNGs can actually be further compressed, making the filesize smaller than a normal image application will typically achieve. The good news is there there is a tool called optipng that makes it easy to non-destructively improve the layout of PNG files.

On Ubuntu, install OptiPNG with sudo apt-get install optipng. Once it is installed, you can run it its default mode by typing optipng file.png. If you feel like giving the application lots of time to achieve aggressive compression, you can use the -o flag to indicate additional compression. Compared between the default and -o7, I have found only minimal additional compression that has almost never been worth the additional CPU time.

Below are the results of one such compression attempt:

optipng -o7 fresh-new-tab-window.png OptiPNG 0.6.4: Advanced PNG optimizer. Copyright (C) 2001-2010 Cosmin Truta. ** Processing: fresh-new-tab-window.png 1358x640 pixels, 4x8 bits/pixel, RGB+alpha Input IDAT size = 436116 bytes Input file size = 436853 bytes Trying: zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 436116 Output IDAT size = 436116 bytes (no change) Output file size = 436217 bytes (636 bytes = 0.15% decrease)

comments | permalink

Master the Art of SSH Tunneling and Forwarding

by PeEll 2011.08.16

SSH tunneling is the practice of using shell account on various computers and servers to acquire and redirect networking between multiple machines. Becoming more adept at SSH tunneling will make your digital world more portable, and enable you to access targetted machines or content, regardless of what network you or the target are on.

SSH Tunneling is great because it allows fully encrypted communication between two servers, even when the services at either endpoint may not use encryption.

Common Use Cases for SSH Tunneling

  • Access services only listening on localhost
  • Access router configuration remotely
  • Proxy into protected networks

Basic SSH Tunneling Concepts

The first and most important concept to understand around SSH tunneling is that in every communication there is a client and a server. Understanding which machine is which is necessary to understand any of the information below. In general terms the client is the machine that will be initiating the connection. The client machine will not require any incoming permissions. A server in a single ssh connection is the machine running sshd and must be accessible via SSH.

Local Forwarding

Local forwarding is the act of taking a remote port and mapping it to a local port on the client machine. This is the most common type of connection and enables proxy-like functionality. Local Forwarding is accomplished using the parameter -L (Hyphen, then Capital L). Every local forwarding command is going to be of the format -Lclientport:destination:destinationport. In the formatting of the command, client port is the port on the machine that will begin listening on localhost. Destination and destinationport are the IP/hostname and Port from the perspective of the server. After successfully opening an SSH connection with local forwarding, any attempt to open clientport on localhost will result in the remote server opening a connection to destionation:destinationport.

Note: It is important to note that if you wish to open a lower port number (for example 80, 631, 25, etc) on the client, you must have root permissions. Typically this is not a problem, because there is no real need to have the client open on a lower port number.

Note: It is also important to note that this connection will be listening on localhost:clientport. This means that you will not be able to access the SSH forwarding from a second degree client, without additional SSH tunneling. An example of this would be where I have 3 machines. Machines A1 and A2 are on network A, and machine B1 is on network B. In this example, if I use local forwarding to connect from A2 to B1, A1 will not be able to access any tunneling performed by A2.

Remote Forwarding

Remote forwarding is the more difficult to understand, as it opening a port on the server, and forwarding those requests to the local machine. This is generally less useful, but can still accomplish some interesting things. The format for remote forwarding is as follows -Rserverport:localdestination:localdestinationport

. In this case, you must have permissions to open serverport on the server, or tunneling will not succeed. Any requests made to localhost on the serverport in the server environment will be forwarded to localdestination:localdestinationport from the perspective of the client.

There are relatively few real world applications of this, but one that I have run into more than once is attempting to run an SSH server on a machine that has no incoming traffic privileges. In this case I use the protected machine as an SSH client to connect to some less secure machine. In the SSH connection, I forward a remote port (2200 is easy to remember) to the local SSH server (localhost:22) with the following command: -R2200:localhost:22. In this confusing example, it swaps the client server roles allows you to SSH into a protected machine, by establishing an initial connection having the protected machine as a SSH client.

SSH Tunneling Examples

For these examples, assume that there are two private networks (A:192.168.0.* and B:10.0.0.*), and one internet site (C:180.0.0.1). Also assume that there is only one publicly accessible IP from each private network (192.168.0.10 and 10.0.0.10). Finally, both of the private networks have a router/modem configured at *.*.0.1.

Access private network A's router

ssh 192.168.0.10 -L8080:192.168.0.1 Once this connection is established, you can pull up the browser and visit localhost:8080 and you will be redirected to the private network's modem configuration. This is a great way to remotely manage port forwarding and NAT without opening your router to the internet.

Access CUPS on a computer not yet configured for sharing

ssh 192.168.0.2 -L6310:localhost:631 - Part of the default CUPS printer configuration is that it only listens on localhost, and is not accessible from other machines. This SSH connection will enable you to open your browser to localhost:6310/ and access the private CUPS configuration.

Forwarding X sessions

ssh -XYC 192.168.0.10 - Although not technically using tunnelling, the XYC parameters will establish the $DISPLAY variable on the server, and allow you to run X applications on the server. These X applications will then be shown on the client environment. This typically runs very slowly, but uses the server's CPU and Memory and Disk and Network, rather than the client's. I often use this for remotely running partition management, such as gparted.


comments | permalink

Logitech Revue will Break your Google TV

by PeEll 2011.08.08

Recently a preview release of Google TV for the Logitech Revue was released. This preview has some exciting components. This release is based on Android 3.1 and includes the Android Market. This preview leak isn't a hacked version, and doesn't require root or any customization to work. Simply download and unzip the package, place it on the root of a flash drive and restart the Google TV, it will automatically update your device.

Overall, the only improvement provided by the update is that it will allow you to preview the upcoming release. There are many downsides and I recommend you Don't download and install it as there is currently no stable release, and no way to downgrade your device.

You will be able to browse the internet, and see the new new settings. Beyond that, NOTHING works.


comments | permalink

Minecraft Map Sharing

by PeEll 2011.08.01

One of the key pieces that Minecraft is currently missing is Map Sharing. I hope to build this tool over the next few weeks. The goal is for users to be able to upload a .zip file containing a map (or just an interesting seed), and allow others to upload, vote/rate, and comment on maps provided by other users.

Minecraft Map Sharing Feature Goals

  • Simple Registration, email, username, password
  • Map Browsing - Browse maps by date, tag, rating, downloads.
  • Map Upload - Upload a seed or map, attach screenshots of your map or seed.
  • Comment on Map
  • Rate Map
  • Social Integration - Plus+ or share maps
  • Connect Maps to Minecraft Overviewer versions?

comments | permalink
View All Articles


Contact Us
© 2003-2011 MortalPowers, Inc.
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.