Skip to content

Instantly share code, notes, and snippets.

View vivekagr's full-sized avatar

Vivek Agarwal vivekagr

View GitHub Profile
{
"logs": [
{
"description": "Google 'Testtube' log",
"key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEw8i8S7qiGEs9NXv0ZJFh6uuOmR2Q7dPprzk9XNNGkUXjzqx2SDvRfiwKYwBljfWujozHESVPQyydGaHhkaSz/g==",
"url": "ct.googleapis.com/testtube/",
"maximum_merge_delay": 86400,
"operated_by": [
0
]
### Keybase proof
I hereby claim:
* I am vivekagr on github.
* I am vivekagr (https://keybase.io/vivekagr) on keybase.
* I have a public key whose fingerprint is 4FA1 AE88 2283 2C82 BA99 3F46 3B29 18BA BEE9 8359
To claim this, I am signing this object:
@vivekagr
vivekagr / vim-on-heroku.sh
Created June 28, 2016 15:07 — forked from sfate/vim-on-heroku.sh
vim on heroku
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
// ==UserScript==
// @name Amazon Add to Cart
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://www.amazon.in/*/dp/*
// @match *://www.amazon.in/dp/*
// @match *://www.amazon.in/gp/product*
// @grant none
@vivekagr
vivekagr / test.conf
Created December 17, 2015 01:09
nginx config to go along with lang.lua
server {
listen 80 default_server;
root /home/ubuntu/test;
index index.html index.htm;
error_log /home/ubuntu/test/error.log;
access_log /home/ubuntu/test/access.log;
location / {
@vivekagr
vivekagr / nginx-lang.lua
Last active December 17, 2015 01:03 — forked from mauron85/nginx-lang.lua
Detect preferred language script for Nginx written in LUA
-------------------------------------------------------------------------------
-- HTTP Accept-Language header handler --
-- @originalAuthor: f.ghibellini@gmail.com --
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang--
-- @modifiedBy: marian.hello@mapilary.com --
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 --
-- @license: MIT --
-- @requires: --
-- @description: --
-- returns language with greatest quality --
@vivekagr
vivekagr / webpack.config.js
Created August 30, 2015 19:17
example webpack config
var webpack = require("webpack");
module.exports = {
entry: {
'respondent-connections': './surveyapp/static/js/respondent-connections/app.js'
},
output: {
path: './surveyapp/static/js/respondent-connections/',
filename: 'build.min.js'
@vivekagr
vivekagr / gist:25e5cde71a662e5e39ca
Created June 3, 2015 14:16
alliance re-connect script
import requests
class AllianceBroadband(object):
def __init__(self, username, password, login_identification_string,
login_page_url='http://10.254.254.116/0/up/'):
self.username = username
self.password = password
self.login_identification_string = login_identification_string
self.login_page_url = login_page_url

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after