Skip to content

Blogs

Leader Pace

I’ve been thinking a lot lately around the difference between people who talk about doing impactful things and the ones who actually move fast enough create that impact. Here is my quick take. Founder mode vs leader pace Founder mode, as YC and Paul Graham describe it, is about founders staying hands-on, close to problems,

passwrd.in

I was looking for a simple password generator, very simple. Without ads, when none was found. I made one with No Ads, No Promos, No Bullshit ! This is just a SEO Post. You can check it at https://passwrd.in , hopefully it will solve your problem.

Why just blocking port 80 won’t help you

We know HTTP is insecure since across the web IANA’s assigned port list is used by default which says port 80 should be used for HTTP traffic, but it’s not that you cannot run anything else which is “non-standard” in port 80. Anyways, coming to point you could be running HTTP server on any port

Security ·

PDF Signing using hardware token (DSC) in Python

Hardware based tokens are widely used in India to generate signed PDF’s like invoices and agreement. We wrote small Python code to sign the invoices automatically where token was attached to a local server. Windows drives are widely available but rare to find linux drivers are listed https://www.e-mudhra.com/Repository/index.html You can uncomment to get the token

Why books matter not just reading

So I am developer and maker – basically a keen person who is interested in almost everything which sounds logical. As hard it is to understand more interested I become in something. In current “vast” space of information, On an average I read 10-15 articles a day that is being done since last 8 years

Solving the problem of phishing !

Phishing is a never ending war thug of war where one side is only trying to stop other side from winning, “Attackers are always trying to be innovative while defenders are trying to innovate on the innovation done by defenders.” Ironic as it may sound, but this is what it is. This article is not

Security ·

Why world will be never cooler again !

The below article discusses my point of view in a mix technical fashion. …and everyone is aware hot and cool are relative terms. Long before you touched ice, you never knew what is cooler than water. The moment you touched ice, you immediately altered your definition of cold. Moreover, definition of hot and cold are

Random ·

IOT Push Button (Like Amazon Dash)

Amazon Dash button is an incredible piece of hardware and another example of “applied engineering” in Amazon, just like Kindle. The inspiration for this project isn’t directly derived from amazon dash, I wasn’t aware of it until I started digging the internet but at end, I had to set the performance goal to Amazon dash, because

arduino · linux · server · snippets ·

Cheap BLE : JDY-08

Disclaimer : This post is based on my experience which is completely subjective, in no way I am promoting any application or product 😉 I have been trying to get my hands into BLE4.0 modules since long. As always I was looking for small, cheap solution, JDY-08 was one of solution I came across –

arduino · linux ·

Adding a display over network !

You are doomed if your laptop has only one HDMI Port & you are running Linux in that box. Unlike windows – where there are tons of easy to run solution, & there are still tons of solutions if you have big numbers in your pocket. Certainly – I neither wish to spend money on external VGA/HDMI

linux · server · snippets ·

Just Another DIY “Smart” Watch

Note : This article was written after project was partially completed, so i don’t have better images. There are hundred’s of projects for building “Smart watch using arduino”, I have curated a list of better projects at end of this article. I didn’t plan to copy any of given projects but at end it turned

arduino · linux ·

Kindle Universal Dashboard

Kindle is Super awesome ! Because of its e-ink display. I wanted a display to present data which has – Least power consumption, Not painful to eyes & obviously one which doesn’t emit blue light. E-Ink displays fit perfectly to my requirement – acquiring a display which can be driven using Raspberry Pi or Arduino is hard,

javascript · linux · server · snippets ·

Custom Nginx with PageSpeed

Pulling nginx from source, customizing & auto updating across servers is a pain, We use pagespeed & custom header modules across all our servers, it autominifies resources & increases page performance without giving pain. Below is script we use :

linux · server · snippets ·

Offline Wikipedia with Elasticsearch and MediaWiki

Wikipedia is Awesome ! It’s open, its free – Yea. & its huge in size, millions of articles but as developer how to exploit the free knowledge. I started digging internet just to find ways to exploit my fresh 9+ GB of XML Gzipped archive which seemed to me of no use as even a simple

linux · server · snippets ·

NodeJs: Improving performance using native binding

This is known fact that javascript is really slow in terms of sync operations like multiplications, divisions etc. – Since nodejs is based on js – Node inherits the curse. Check http://benchmarksgame.alioth.debian.org/u64/compare.php?lang=v8&lang2=gpp this article to cross check the fact. Nodejs is fast in some aspects. I love it 😛 Doesn’t matter how much you improve

javascript ·

Email Spoofing: Why its dead !

There was a time, when mail spoofing was an art, was a thing to impress people, was a way to phish attack someone. With increasing intelligence in spam filters – it became harder, you need good IP reputation to deliver mail to box. But now it has become almost impossible to spoof address like someone@hotmail.com

server ·

Website Optimization: Cache Cache Cache !

You must have heard about cache in web (caches are everywhere in computer science), most times you find it really buggy when changes aren’t reflected as soon as you make them. For sites with small traffic these things are buggy – but they contribute a major in server traffic when you have a million hits

server ·

Website Optimization: Minfiying Output using PHP

Minification is technique used in which we remove all unnecessary Whitespaces Which include tab, space, newline, carriage return etc. This is done just to reduce data transfer. Since not everyone is serving a million hits a seconds – minifying html doesn’t help much, Instead enabling GZIP compression is a better technique. Apart from this –

css · javascript · server ·

Maintaining JS Libs: Changing bower path

If you are web developer it becomes hard to manage all js libraries if you aren’t using any package manager. Few folks created bower to make the job easier. (As far as functionality is concerned, it works same as npm, if you have used.) Steps for installations are just for linux guys – windows people

javascript · snippets ·

Optimal way of scheduling long job: nodejs/js

If you are using nodejs for some backend stuff to schedule some-work, probably you will hate scheduling because of two factors You can’t set long timeout Timers are removed when process restart You would probably favor cronjobs for scheduling – or may be polling database for regular interval. Loading nodejs script every 5min is a

javascript · server · snippets ·

Javascript Domless events

Using jQuery or nodejs makes you addicted to pubsub (publish/subscribe) model. Nodejs has nattive support for event emitters but javascript doesn’t have. Events are only binded to a DOM, using which doesn’t make sense and its also adds to performance cost. To solve the problem i wrote a custom class which implements `on` and `emit`

javascript · snippets ·

Converting Opensource Dictionary to JSON

Folddoc provide free online computer dictionary but they don’t have any standard tool or format to import dictionary in database or so. Dictionary can be downloaded form http://foldoc.org/Dictionary.txt Run the following nodejs code it will dump dictionary to OUTPUT.json and don’t forget to remove initial lines of disclaimer or they will add to your dictionary.

snippets ·

Importing large CSV file to Mongo.

Someday you will need to import a large file to mongo or some other DBMS , You start writing code for achieving same using NodeJS, but when you run memory usage start increasing and either core of your CPU is at 100%.

Getting whatsapp statistics: WhatsappWeb

There are no tool available for whatsapp which give us how many messages a user has contributed to group, Sometimes you need. Whatsapp web exposes whatsapp to JS, whiche makes things more easy, I wrote a simple code which logs Number of messages sent by each user of group, obviously you need full conversation open

Redis Vs MongoDB

Redis and Mongodb are considered to solve a common problem that “There is something wrong with RDBMS” So what is difference ? Redis is stored in memory and swapped with disk, So data is not lost and you can enjoy performance of your RAM. (Not to be confused with Memcached it is memory only database)

Why not nodejs v4.1.1

Recently i updated nodejs installation to v4.1.1 using curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash – sudo apt-get install -y nodejs and i ended up fixing many bug in other modules, but i couldn’t move far in this decision. Nodejs has a history of breaking compatibility with older code in every new release, so if

Backup Server Configurations to Git

When you have multiple servers it pain to remember every configuration and it may take hours to configure servers again incase you need. It is also impractical to copy each files. There are few tools available but they come with overhead attached moreover its fun to write custom solutions 🙂 1. Create directory 2. cd

git · linux · server · snippets ·

Cloning Server to New Hardware

You can find many ways of cloning old server to new hardware, create diskimage and move to new hardware and if you have identical hardware use `dd` or similar tool to copy disks block by block, but if you have new hardware and want to move server without downtime and with no configuration change there

linux · server ·

Adding ellipsis to long text

When you have some long division and you don’t want to wrap text or extend size of div, But instead you want to use add few `…` at end of text using CSS .wrapped{ overflow:hidden; white-space: nowrap; text-overflow: ellipsis; width: 300px; } Example : Text without text-overflow :Lorem ipsum dolor sit amet, consectetur adipiscing elit.

css · snippets ·

Monitoring Website for Downtime

Sometimes our in house server go down, But at production level we cannot take risk of 1min downtime, so we were supposed to monitor our server for downtime. Although there are many cheap services available but i decided to do it my own way, I can use this script in my RPI to monitor even

linux · python · server ·

Simple automatic versioning using git

Many times while working on projects its hard to keep track of which version is in staging server, which is on production and which other developers of team are working on, Especially when you are a small startup with limited number of resources. (Its really painful to setup automatic deployment in gitlab). Here is what

git · linux ·

Hello World !

First post for friends, family & love.