Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am incognitosj on github.
  • I am swapniljain13 (https://keybase.io/swapniljain13) on keybase.
  • I have a public key ASAclapamgrN47p8BeZ6T24b74IgScmxJ9KWYCq8yu-0Ugo

To claim this, I am signing this object:

@incognitosj
incognitosj / parse_gmail_data.gs
Created January 8, 2017 14:16
Read all emails from a Gmail Label, parse using Regex and store it to a Google Spreadsheet
/**
* method for parsing the data
**/
function parseEmail() {
var emails = readGmailLabel("your label here");
var parsedData = [];
var data, parsedRegex;
for (var i = 0; i < emails.length; i++) {
data = []
@incognitosj
incognitosj / parse_text_regex.gs
Created January 8, 2017 14:05
Parse text using Regex to Extract Intended Data
/**
* text: data from which data needs to be parsed
* regularExpression: Regular expression
**/
function extractData(text, regularExpression) {
var regex = new RegExp(regularExpression);
var res = body.match(regex);
return res;
}
@incognitosj
incognitosj / read_labeled_email.gs
Last active January 8, 2017 14:06
Google App Script pop all emails from a Gmail Label
/**
* label: gmail label to be read
**/
function readGmailLabel(label) {
var emails = [];
var label = GmailApp.getUserLabelByName(label);
var threads = label.getThreads();
for (var j = threads.length - 1; j >= 0; j--) {
emails.push({
@incognitosj
incognitosj / nginx.conf
Created September 17, 2016 10:37 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
<div>
//Paste the code you got from twitter here
</div>
@incognitosj
incognitosj / Tumblr-subtitle-html
Created February 13, 2014 12:11
Tumblr-subtitle-html
<span class="sub-title">
{Description}
</span>
@incognitosj
incognitosj / fblikecallback
Created February 9, 2014 15:28
twitter tweet and facebook like callbacks
<html lang="en">
<head>
<meta charset="utf-8">
<title>
FB like
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
@incognitosj
incognitosj / fblikebutton
Created February 9, 2014 15:17
Fb like button html5
<div class="fb-like" data-href="{youUrl}" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
@incognitosj
incognitosj / fblike.txt
Created February 9, 2014 14:12
Facebook like button
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId={yourAppId}";
fjs.parentNode.insertBefore(js, fjs);