Skip to content

Instantly share code, notes, and snippets.

View pankajparashar-zz's full-sized avatar

Pankaj Parashar pankajparashar-zz

View GitHub Profile
/**
* html5 progress bar styling
*/
html{
background: #f06;
background: linear-gradient(45deg, #f33, #a33);
min-height:100%;
}
/* remove standard styling
/**
* html5 progress bar styling
*/
html{
background: #f06;
background: linear-gradient(45deg, #f33, #a33);
min-height:100%;
}
/* remove standard styling
@pankajparashar-zz
pankajparashar-zz / loading.css
Created August 4, 2013 10:02
Loading Animation
/* <h1 data-content="Contad">Contad</h1> */
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
/*
==============================================
CSS3 ANIMATION CHEAT SHEET
==============================================
Made by Justin Aguilar
www.justinaguilar.com/animations/
Questions, comments, concerns, love letters:
@pankajparashar-zz
pankajparashar-zz / fibonacci.py
Created August 3, 2013 08:43
Fibonacci series in python.
# Version 1
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)
# Version 2
@pankajparashar-zz
pankajparashar-zz / redirection.sh
Last active December 20, 2015 04:29
All about redirection - 0(stdin) 1(stdout) 2(stderr)
1. redirect stdout to a file
ls -l > ls-l.txt
2. redirect stderr to a file
grep da * 2> grep-errors.txt
3. redirect stdout to a stderr
grep da * 1>&2
4. redirect stderr to a stdout
@pankajparashar-zz
pankajparashar-zz / sed.sh
Created July 15, 2013 12:50
one liner sed
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
@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:
# 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
#!/usr/bin/env python
"""
Python script that runs one-liner python scripts similarly to how Perl runs them
portions based on http://code.activestate.com/recipes/437932-pyline-a-grep-like-sed-like-command-line-tool/
(Graham Fawcett, Jacob Oscarson, Mark Eichin)
interface inspired by Perl
"""