Skip to content

Instantly share code, notes, and snippets.

View pankajparashar-zz's full-sized avatar

Pankaj Parashar pankajparashar-zz

View GitHub Profile
@pankajparashar-zz
pankajparashar-zz / browser.txt
Created June 29, 2013 17:07
One line browser notepad
Version 1
---------
data:text/html, <html contenteditable>
Version 2
---------
data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">
Version 3
---------

To access the developer tools, on any web page or app in Google Chrome you can use one of these options:

  • Select the Wrench menu at the top-right of your browser window, then select Tools → Developer tools.
  • Right-click on any page element and select Inspect element.
  • Shortcut keys:
# Python Help
python -h
# Calendar
python -m calendar
python -m calendar -h
python -m calendar 1999
# Zip and Gzip Tools
python -m zipfile -l pcblib.zip
@pankajparashar-zz
pankajparashar-zz / awk.sh
Created July 15, 2013 12:50
one liner awk
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
Compiled by Eric Pement - eric [at] pement.org version 0.27
Latest version of this file (in English) is usually at:
http://www.pement.org/awk/awk1line.txt
This file will also be available in other languages:
Chinese - http://ximix.org/translation/awk1line_zh-CN.txt
USAGE:
.random-color {
border-top-color: "LightCoral";
border-right-color: #a44b58;
border-bottom-color: rgb(108, 188, 134);
border-left-color: rgb(24%, 88%, 5%);
outline-top-color: hsl(88, 69%, 69%);
outline-right-color: rgba(220, 71, 132, 0.69);
outline-bottom-color: rgba(79%, 47%, 14%, 0.37);
outline-left-color: hsla(111, 31%, 38%, 0.86);
}
@pankajparashar-zz
pankajparashar-zz / twitter.json
Created August 22, 2016 12:36 — forked from hrp/twitter.json
Example JSON response from Twitter streaming API
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
sudo chown -R `whoami` ~/.npm
sudo chown -R $USER /usr/local
@pankajparashar-zz
pankajparashar-zz / cheatsheet.md
Created December 18, 2013 14:52
Markdown Cheatsheet
body {
font-size: 1em;
line-height: 1.5em;
}
h1 {
font-size: 6.87500em;
line-height: 1.09091em;
margin-top: .2182em;
margin-bottom: .4364em;
@pankajparashar-zz
pankajparashar-zz / SassMeister-input.scss
Created December 8, 2013 07:16
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// SCSS version of Joshua's baseline generator - [http://joshnh.com/tools/em-baseline-generator.html]
// Article - http://joshnh.com/2011/08/03/how-to-set-up-a-baseline-grid/
$base-font-size: 16px !default;
$line-height: 24px !default;