Skip to content

Instantly share code, notes, and snippets.

View chiragchamoli's full-sized avatar
💭
I may be slow to respond.

Chirag Chamoli chiragchamoli

💭
I may be slow to respond.
View GitHub Profile
@chiragchamoli
chiragchamoli / mdcc.md
Last active August 10, 2016 06:14
Markdown Cheat-sheet

Markdown Cheat Sheet

H1 tag

H2 tag

H3 tag

H4 tag

H5 tag
H6 tag

This text will be italic

@chiragchamoli
chiragchamoli / imdbapi.php
Created August 6, 2012 11:28
Simple IMDB API
//url
$url = 'http://www.imdb.com/title/tt0367882/';
//get the page content
$imdb_content = get_data($url);
//parse for product name
$name = get_match('/<title>(.*)<\/title>/isU',$imdb_content);
$director = strip_tags(get_match('/<h5[^>]*>Director:<\/h5>(.*)<\/div>/isU',$imdb_content));
$plot = get_match('/<h5[^>]*>Plot:<\/h5>(.*)<\/div>/isU',$imdb_content);
@chiragchamoli
chiragchamoli / How to include gist in your jekyll blog.js
Created August 6, 2012 11:56
How to include gist in your jekyll blog
{% assign gist_id = 3273735 %}
<script src="http://gist.github.com/{{ gist_id }}.js"></script>
@chiragchamoli
chiragchamoli / wordpress stats
Created August 9, 2012 10:33
wordpress stats
http://stats.wordpress.com/csv.php?api_key=32bf3227c61d&blog_uri=http://YOURBLOG.com&days=1&format=josn&table=views
@chiragchamoli
chiragchamoli / test.html
Created August 14, 2012 10:59
html5 template
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
@chiragchamoli
chiragchamoli / js coding convention.js
Created August 16, 2012 18:21
Javascript coding convention
Chirag Notation
tf_ - boolean
cnt_ - counter
arr_ - array
str_ - string
arr[i] - index
db_ - database
g_, m_ : scope
@chiragchamoli
chiragchamoli / social share count.php
Created August 17, 2012 10:03
Social Share Count
<?php
class SocialCount
{
public static function getAll($link)
{
return self::getServices($link);
}
@chiragchamoli
chiragchamoli / Archived Stevey's Google Platforms Rant.txt
Created August 20, 2012 03:41
Archives: Stevey's Google Platforms Rant
Stevey's Google Platforms Rant
It now 404's so I've posted it here:
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don'
@chiragchamoli
chiragchamoli / Archive Tim Berners-Lee's Original Announcement.txt
Created August 20, 2012 12:23
Archives: Tim Berners-Lee's Original Announcement.
The WorldWideWeb application is now available as an alpha release in source
and binary form from info.cern.ch.
WorldWideWeb is a hypertext browser/editor which allows one to read information
from local files and remote servers. It allows hypertext links to be made and
traversed, and also remote indexes to be interrogated for lists of useful
documents. Local files may be edited, and links made from areas of text to
other files, remote files, remote indexes, remote index searches, internet news
groups and articles. All these sources of information are presented in a
consistent way to the reader. For example, an index search returns a hypertext
document with pointers to documents matching the query. Internet news articles
@chiragchamoli
chiragchamoli / install node.js on ubuntu
Created September 4, 2012 05:46
install node.js on ubuntu
install node.js on ubuntu
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm