Skip to content

Instantly share code, notes, and snippets.

View himangshuj's full-sized avatar
💭
Fool me twice

himangshu himangshuj

💭
Fool me twice
View GitHub Profile
@himangshuj
himangshuj / pl_startup_tables.markdown
Last active April 30, 2021 18:39
Programming Languages Table Gist
Product Year Made Primary Language Language/Framework Founded Hypothesis on why did they choose it ?
MS DOS 1982 8086 Assembly 1972 Microsoft had to deliver a new operating system for IBM in limited time. Instead of building from scratch , they modified the 8 bit CP/M for 16 bit PCs.
Yahoo Directory 1994 Html 1991 No definitive article on the initial architecture of Yahoo but based on architecture of related WWW Virtual Library, it can be guessed it was pure static pre generated html.
Amazon.com July 1995 Perl 1987 At that time, websites were text heavy and perl was possibly the easiest way to manipulate text
Google.com July 1996 Python 1990 In 1996, python was probably the easiest way to crawl the web as compared to any other language. At it's heart, google is a crawler
Youtube.com 2005 Php 1995 By 2005, Php was the reigning champion for web programming.
Facebook.com 2003 Ph

Keybase proof

I hereby claim:

  • I am himangshuj on github.
  • I am himangshuj (https://keybase.io/himangshuj) on keybase.
  • I have a public key ASDyvbjgZzfkOli0JROLDWkmEQl9iSyHdKONvsPeqPOXcgo

To claim this, I am signing this object:

@himangshuj
himangshuj / inlineCss.js
Last active March 3, 2016 08:38
inlineCssPrerenderplugin
var uncss = require('uncss');
var CleanCSS = require('clean-css');
module.exports = {
beforeSend: function(req, res, next) {
if(!req.prerender.documentHTML) {
return next();
}
var matches = req.prerender.documentHTML.toString().match(/<link(?:.*?)rel="stylesheet"(?:.*?)>/gi);
@himangshuj
himangshuj / inlineCss.js
Created March 3, 2016 08:28
inlineCssPrerenderplugin
var uncss = require('uncss');
var CleanCSS = require('clean-css');
module.exports = {
beforeSend: function(req, res, next) {
if(!req.prerender.documentHTML) {
return next();
}
var matches = req.prerender.documentHTML.toString().match(/<link(?:.*?)rel="stylesheet"(?:.*?)>/gi);
@himangshuj
himangshuj / app.js
Last active September 3, 2019 17:18
how to test $urlRouterProvider for angularjs
(function (ng, app) {
ng.module('sokratik.app.container', [
'ui.router',
])
.config(function myAppConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/start');
})
.controller('AppCtrl', ["$scope", "$location", function AppCtrl($scope, $location) {
}]);