Blog Bug's

bugging blogs

… on Connecting to Samba Shares from Linux Boxes

  • to connect to authenticated samba share from a different linux box user,
    add these lines under global config on **/*/smb.conf


client NTLMv2 auth = no
client use spnego = no

  • restart samba as needed
posted by ninoy in Tips and have No Comments

… on Creating UEFI Bootable USB for Windows 10 from Mac

Old PCs and Laptops will not allow to boot NTFS formatted USBs. Current Windows installers contain files larger than FAT32 can support. If we somehow break our Windows OS and we failed to make Recovery DVD/USB, here’s a way to make the Recovery USB manually. Make 2 partitions on USB that will allow olders boxes to boot it on the 1st FAT32 partition under UEFI and will allow you to copy larger install files on the other NTFS partition.

  • Prepare ISO Image
    • Download Windows ISO from their site –> `https://www.microsoft.com/en-us/software-download/windows10ISO` (10 being the latest version to date)
    • Mount ISO by clicking image on Mac and will be available on /Volumes/*
  • Prepare USB
    • Plug in USB on Mac and open up some terminal
    • Use `diskutil list` to verify the exact `/dev/diskn` of the USB
    • Make 2 partitions on USB (one FAT32 and the other NTFS) with `diskutil partitionDisk /dev/disk2 GPT MS-DOS BOOT 10g ExFAT WINDOWS10 0b` . In the end, these will also be mounted to `/Volumes/*`
  • Copy Files from ISO to USB
    • Copy smaller files to to FAT32 (BOOT) partition. Only required files to boot.
      • Copy all files from ISO except `sources` folder. Create a separate empty `sources` folder on this partition.
      • Copy `ISO:/sources/boot.wim` to the created `sources` folder
      • We just have the only necessary files to boot the USB
    • Copy all files including the bigger files for FAT32 to the NTFS partition
  • We have now a Recovery USB that will boot even in older boxes
    • Don’t forget to unmount the ISO and USB
posted by ninoy in Tips and have No Comments

… on CSS Frameworks

a very good css framework at http://foundation.zurb.com…

posted by ninoy in CSS,Tips and have No Comments

on Downgrading PHPUnit 3.6 to 3.5 in Ubuntu …

sudo apt-get remove phpunit

sudo pear upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear install –alldeps phpunit/PHPUnit

sudo pear uninstall phpunit/PHPUnit
sudo pear uninstall phpunit/DbUnit
sudo pear uninstall phpunit/PHP_CodeCoverage
sudo pear uninstall phpunit/File_Iterator
sudo pear uninstall phpunit/Text_Template
sudo pear uninstall phpunit/PHP_Timer
sudo pear uninstall phpunit/PHPUnit_MockObject
sudo pear uninstall phpunit/PHPUnit_Selenium
sudo pear uninstall pear.symfony-project.com/YAML

sudo pear install pear.symfony-project.com/YAML-1.0.2
sudo pear install phpunit/PHPUnit_Selenium-1.0.1
sudo pear install phpunit/PHPUnit_MockObject-1.0.3
sudo pear install phpunit/PHP_Timer-1.0.0
sudo pear install phpunit/File_Iterator-1.2.3
sudo pear install phpunit/PHP_CodeCoverage-1.0.2
sudo pear install phpunit/Text_Template-1.0.0
sudo pear install phpunit/DbUnit-1.0.0
sudo pear install phpunit/PHPUnit-3.5.15

posted by ninoy in PHP and have No Comments

… on Removing Constraint on Port Addressing

Can’t think of any way, but have the idea of applying the
concept of frequency-hopping spread spectrum. But instead
of channels, use the port numbers to hop in.

posted by ninoy in CS 255 and have No Comments

… on Modified Network Layer to Support Real-time Service

Real-time transfer suggests that when a request has been made, it is immediately communicated to the recipient. Hence, putting off packet transmissions, no matter how much of a fraction of a second, would be undesirable.

Currently, TCP handles packet transmissions with the aid of acknowledgements and waiting for acknowledgements could possibly result to transmission delays. To support real-time transfer in TCP, we suggest to remove the retransmission of lost packets to lessen latency and delay of receiving packets. For audio/video applications, minor loss of data is tolerable.

To minimize packet losses, the window size would still adapt the slow start, additive increase and multiplicative decrease of window size protocol. This will still provide the balance between the load and the fairness of the network.

For applications that do not tolerate data loss and requires reliability, the packets will be sent in duplicates. The amount of duplicates are determined on how often the timeouts occur. Upon a timeout, the transmission window would increase the allocation of the duplicates. The amount of duplicate packets would increase say from 10% to 15% of the current window size. This will continue to increase up to 50% maximum (all packets will be sent with duplicates).
On the next sending and if there is no time-out received on the previous data sent, the number of redundant packets to be sent would be decreased by say 5% or 10%. This would continue until there is no more duplicate packets sent.

It should be noted that duplicate packets will not congest the network since the window size is decreased during timeouts. However, the number of redundant packets are to be increased. The trade-off with this method is the efficiency of the usage of the resources against the reliability of the transfer.

Another thing to consider is to determine packets to duplicate. Certain packets may hold important data which if lost would translate to an incomplete and incomprehensible message. It would also be inefficient to send multiple packets that would be discarded at the receiving end.

posted by ninoy in CS 255 and have No Comments

… on Network Layer Reliability

Reliable delivery implementations can be implemented at the end points and also in the network core.

Reliability in the end points is seen on the reliable/sequenced delivery provided by TCP on the transport layer. Hosts and networks work hand-in-hand in the successful delivery of packets from one end to another. This is particularly crucial when TCP sends an acknowledgement receipt to the host. Such acknowledgement would include the next sequence number for transmission. More than that, TCP is also responsible for the validation of addresses. At the same time, TCP also performs the packet queueing. The role of TCP in validating addresses, queueing packets suggest its indispensability in the successful delivery of packets from one end to another. The host merely respond to the requests by the TCP (e.g. retransmission).

On the other hand, reliability on the network core starts on the physical layer reliability that pertains to the high availability and continuity of network. This can be achieved through redundancy, either on links or routers’ processors and line cards. That is, we achieve higher network reliability by redundancy in low reliability network elements. Reliability can be effectively translated from the physical layer to upper layers (i.e. data link and network layer) with a resilient upper layer. Resiliency is the ability to react on failure and there are certain data link/network layer protocols that provide resiliency, namely OSPF, MPLS, and Ethernet with RSTP.

Currently, much of the reliability concern is implemented on the end points. But with the changing demand and usage of the internet, especially with regard to real-time, reliable, and highly available voice services, broadcast media transmission, and video on demand, in the future network (NGN – next generation networks), reliability on the lower layers are more explored to address new demands.

References:
Cerf, Vinton and Kahn, Robert. A Protocol for Packet Network Intercommunication. IEEE. 1974.
Clark, David. The Design Philosophy of the DARPA Internet Protocols. Proc SIGCOMM. 1988.
Clark, David. Rethinking the design of the Internet: The end to end arguments vs. the brave new world. MIT Lab for Computer Science. 2000.
Carpenter, B.. Architectural Principles of the Internet. IAB. 1996.
Koudrin, Alex. Network Reliability and Resiliency in Next Generation Networks at Physical, Datalink, and Network Layers. Victoria University of Wellington. 2007.

posted by ninoy in CS 255 and have No Comments

posted by ninoy in CS 255 and have No Comments

… on Having Updated Sane

$ sudo add-apt-repository ppa:plaxx/random-fixes
$ sudo apt-get update
$ sudo apt-get install libsane sane-utils

posted by ninoy in Tips and have No Comments

…on Maps API (Google 1.x, Google 2.x, & OSM) – Javascript with Paths

Google 2.x

	<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag">
	</script>
	<script type="text/javascript">
		google.load("maps", "2.x");
		function initialize() {
			var map3a = new google.maps.Map2(document.getElementById("map3a"));
			var polyline = new GPolyline(
				[
					new GLatLng(14.647185,121.068959),
					new GLatLng(14.648783,121.069002),
					new GLatLng(14.648638,121.068637)
				], 
				"#ff0000", 
				5
			);
			map3a.addOverlay(polyline);				
			map3a.setCenter(new google.maps.LatLng(14.648552,121.068553), 17);
		}
		google.setOnLoadCallback(initialize);
	</script>
	<div id="map3a" style="height: 400px; width: 400px;"></div>


OSM

	<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
	<script>
		var init = function() {
			var map3b = new OpenLayers.Map("map3b");
			var mapnik = new OpenLayers.Layer.OSM();
			map3b.addLayer(mapnik);
			var geometry = new OpenLayers.Geometry.LineString(
				[
					new OpenLayers.Geometry.Point(121.068959,14.647185).transform(
						new OpenLayers.Projection("EPSG:4326"),
						new OpenLayers.Projection("EPSG:900913")
					),
					new OpenLayers.Geometry.Point(121.069002,14.648783).transform(
						new OpenLayers.Projection("EPSG:4326"),
						new OpenLayers.Projection("EPSG:900913")
					),
					new OpenLayers.Geometry.Point(121.068637,14.648638).transform(
						new OpenLayers.Projection("EPSG:4326"),
						new OpenLayers.Projection("EPSG:900913")
					)
				]
			);
			var feature = new OpenLayers.Feature.Vector(
				geometry, 
				null,
				{
					strokeColor: "#ff0000",
					strokeOpacity: 0.7,
					strokeWidth: 5
				}
			);
			var vectors = new OpenLayers.Layer.Vector("Vectors");
			vectors.addFeatures(feature);
			map3b.addLayer(vectors);
			var lonLat = new OpenLayers.LonLat(121.068553,14.648552).transform(
				new OpenLayers.Projection("EPSG:4326"),
				new OpenLayers.Projection("EPSG:900913")
			);
			map3b.setCenter(lonLat, 17);
		}
		addOnLoadEvent(init);
    </script>
	<div id="map3b" style="height: 400px; width: 400px"></div>


refresh if no map rendered

posted by ninoy in CS 297 and have No Comments