Skip to content

Instantly share code, notes, and snippets.

@psibi
psibi / .fonts.conf
Created February 15, 2012 14:24
Fix Font rendering
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >

The Ying-Yang of CEOs and Engineers

All successful startups begin with two founders. One guy is the Engineer, and the other guy is the business dude. Over the years of working with various people, I've learned what makes a good engineer, and what makes a good business dude, and the two are complete opposites of each other.

CEO Engineer
@psibi
psibi / index.html
Created October 22, 2012 15:12
Basic Template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers map preview</title>
<!-- Import OL CSS, auto import does not work with our minified OL.js build -->
<link rel="stylesheet" type="text/css" href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"/>
<!-- Basic CSS definitions -->
<style type="text/css">
@psibi
psibi / popup
Created October 22, 2012 15:57
Popup
function setHTML(response){
document.getElementById('nodelist').innerHTML = response.responseText;
var popup_info = response.responseText;
if (popup != null) {
popup.destroy();
popup = null;
}
popup = new OpenLayers.Popup("Sample",
mouseloc,
@psibi
psibi / index.html
Created October 22, 2012 16:02
OpenLayer Popup Working Code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers map preview</title>
<!-- Import OL CSS, auto import does not work with our minified OL.js build -->
<link rel="stylesheet" type="text/css" href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"/>
<!-- Basic CSS definitions -->
<style type="text/css">
@psibi
psibi / parse.html
Created October 22, 2012 16:17
jQuery object
var body = '<div id="body-mock">' + html_variable.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>';
var jobject = $(body);
@psibi
psibi / table.html
Created October 22, 2012 16:34
Build table using jQuery
var jobject = $(html_response_data);
$("caption.featureInfo",jobject).remove(); //Removing Caption tag
var mytable = "<table class=\"featureInfo\"><thead>";
var trs = $('tr',jobject);
trs.each(function(i,n) { //console.log($(n).html());
if (i==0) { mytable += $(n).html(); mytable += "</thead><tbody>";}
else { mytable += "<tr>"; mytable +=$(n).html(); mytable += "</tr>";}
});
mytable += "</tbody></table>";
$('#nodelist').html(mytable); //Put the table in the div whose id is "nodelist"
@psibi
psibi / sab.py
Created October 30, 2012 10:56
sab python
from Sim import Simulator
a = Simulator()
b = a.start_execution(3,["hi","/home/sibi/Downloads/Softwares/version5/trunk/src/Transims50/alexandria/setup/control/sim.ctl"])
@psibi
psibi / wvdial.conf
Created November 15, 2012 17:25
wvdial.conf
[Dialer airtel]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","airtelgprs.com"
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = *99#
@psibi
psibi / sample.cpp
Created November 20, 2012 19:37
Integer to String
#include <iostream>
#include <string>
using namespace std;
int main()
{
int number = 50;
string str;
str = to_string(number);
cout<<str;