Skip to content

Instantly share code, notes, and snippets.

View dipaktelangre's full-sized avatar

Dipak Telangre dipaktelangre

  • Coditas
  • Pune
View GitHub Profile
@dipaktelangre
dipaktelangre / google-analytic-demo
Last active December 19, 2015 13:58
Notes for Demo session on Google Analytics
/*Google Analytics?
Google Analytics is a service offered by Google that generates detailed statistics about a website's traffic and traffic sources and measures conversions and sales.
Google Analytics can track visitors from all referrers, including search engines and social networks, direct visits and referring sites. It also displays advertising, pay-per-click networks, email marketing and digital collateral such as links within PDF documents.
How it work ?
Page tags-->
Google Analytics is implemented with "page tags". A page tag, in this case called the Google Analytics Tracking Code is a snippet of JavaScript code that the website owner user adds to every page of the website. The tracking code code runs in the client browser when the client browses the page (if JavaScript is enabled in the browser) and collects visitor data and sends it to a Google data collection server as part of a request for a web beacon.

Prefix all commands with Ctrl-b

Command                                 Action

c	                      Create a new window
n	                      Change to next window
p	                      Change to previous window
"	                      Split pane horizontally
%	                      Split pane vertically
,	                      Rename current window
o	                      Move to next pane
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
# Find files which contains the "everybody wants me" text
#
# grep -H "everybody wants me" some/dir -R | cut -d: -f1
#
# it will print matching file names
#
# so what if we create handy command for it as:
#
grep -H $0 $1 -R cut -d: -f1
@dipaktelangre
dipaktelangre / code_snippets
Last active December 17, 2015 12:38
Check IE versions
Check IE Version
// This function returns Internet Explorer's major version number,
// or 0 for others. It works by finding the "MSIE " string and
// extracting the version number following the space, up to the decimal
// point, ignoring the minor version number
<SCRIPT LANGUAGE="JavaSCRIPT">
function msieversion()
{
var ua = window.navigator.userAgent