Skip to content

Instantly share code, notes, and snippets.

View cggaurav's full-sized avatar
🏠
Working from home

Gaurav cggaurav

🏠
Working from home
View GitHub Profile
@cggaurav
cggaurav / flipsicle
Created June 25, 2013 01:42
core.js
<script>
window.MERCHII_SITE_ID = "flipsicle";
</script>
<script type="text/javascript" src="//embed.merchii.com/core.js" async="true"></script>
@cggaurav
cggaurav / mailto
Created July 15, 2013 00:13
Mailto <a> tags
Open default mail program, create new message with the TO field already filled out.
<a href="mailto:someone@yoursite.com">Email Us</a>
Adding a subject
Open default mail program, create new message with the TO and SUBJECT field already filled out. Essentially we are adding the parameter subject to the href value.
Spaces in the subject will probably work OK, but to be super-extra sure, you can replace spaces with "%20".
<a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a>
@cggaurav
cggaurav / hipmob script
Created August 6, 2013 18:17
Merchii Hipmob
<!-- HipMob -->
<script type="text/javascript">
var _hmc = _hmc || [];
_hmc.push(['app', ""]);
_hmc.push(['title','Talk to us']);
_hmc.push(['tab', { 'background-color': '#222222', 'color': '#FFFFFF', 'font-size': '12px', 'font-weight': 'bold' }]);
_hmc.push(['settings', { 'border-color': '#222222', 'height': '350px', 'width': '250px' }]);
_hmc.push(['title',"Talk to us"]);
_hmc.push(['statusicons', {
'online': '//www.hipmob.com/themes/gmail/online.png',
@cggaurav
cggaurav / opbeat.js
Created August 11, 2013 00:30
opbeat_config
var opbeat = require('opbeat');
var opbeat_options = {
organization_id: 'A', // Required unless OPBEAT_ORGANIZATION_ID environment variable is set
app_id: 'B', // Required unless OPBEAT_APP_ID environment variable is set
secret_token: 'C', // Required unless OPBEAT_SECRET_TOKEN environment variable is set
env: 'production' // Optional - falls back to NODE_ENV || 'development'
// hostname: '...', // Optional - falls back to OS hostname
// logger: '...', // Optional
// handleExceptions: false, // Optional - defaults to true
// silent: true, // Optional - defaults to false
@cggaurav
cggaurav / withcors.xml
Created September 18, 2013 14:14
S3 BUCKET CONFIG
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@cggaurav
cggaurav / gmail.js
Created October 2, 2013 21:38
Ali3
/*
---------------------------------------------
G M A I L A U T O F O R W A R D I N G
---------------------------------------------
The forwardMail function will auto-forward mails
associated with a particular Gmail label to the
/*
---------------------------------------------
G M A I L A U T O F O R W A R D I N G F O R F U C K I N G P O D I O M A I L
---------------------------------------------
// Made for Ali Amin, by Gaurav #hack
@cggaurav
cggaurav / gmail2.js
Created October 2, 2013 22:00
PodioMail
/*
---------------------------------------------
G M A I L A U T O F O R W A R D I N G
---------------------------------------------
The forwardMail function will auto-forward mails
associated with a particular Gmail label to the
@cggaurav
cggaurav / redis.conf
Created October 10, 2013 00:24
REDIS CONF
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@cggaurav
cggaurav / redis.conf
Last active December 25, 2015 03:39
Docker Redis
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes