Skip to content

Instantly share code, notes, and snippets.

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

Vivek Gupta vivg

🏠
Working from home
View GitHub Profile
@vivg
vivg / resume.json
Last active December 11, 2024 10:32
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Vivek Gupta",
"email": "mail@vivekgupta.com",
"phone": "+91-9008273000",
"url": "https://vivekgupta.com",
"summary": "Engineering Leader with 16.5 years of experience, currently driving technical strategy at Thena. Previously led engineering teams as Director at Unacademy and Engineering Manager at Flipkart. Was the founding engineer at Perk (TSX: PER), helping scale the company from inception through successful acquisition by Tremor (LSE: TRMR).",
"location": {
"countryCode": "IN",
@vivg
vivg / open-source-laravel-projects.md
Last active August 25, 2016 19:58
Open Source Laravel Projects

#Open Source Laravel Projects

@vivg
vivg / gist:12dbd13fb70d8373f548afb7fcc2e64d
Last active September 30, 2019 12:41
PHP Libraries
//paste at the end of routes.php
\Event::listen('Illuminate\Database\Events\QueryExecuted', function ($query) {
var_dump($query->sql);
var_dump($query->bindings);
var_dump($query->time);
});
//parent page
function setCookieXD() {
var message = {};
message.fname = "Vivek";
message.lname = "Gupta";
var receiver = document.getElementById('diff-domain').contentWindow;
receiver.postMessage( message, 'http://iframe-domain.com');
}
// iframe page
@vivg
vivg / gist:74646ee36c7a12befaa0
Created April 13, 2015 09:25
FB JS SDK initialization polling
function FB_wait() {
if (typeof FB == "undefined") {
window.setTimeout(FB_wait, 100);
} else {
console.log("fb ready");
FB.Event.subscribe("comment.create", comment_callback);
}
}
@vivg
vivg / dump_and_restore
Last active August 29, 2015 14:17
Take postgresql dump and restore
#take full dump
pg_dump -i -U user_name -F t -b -v -f "prod.backup" db_name
#restore specific table
pg_restore -i -U user_name -d db_name -t table_name -v "prod.backup"
@vivg
vivg / apg_diff
Created March 27, 2015 17:57
Takes Postgresql schema dump and runs apgdiff tool to save the diff in a file.
pg_dump -U perkdsp -svf "production_schema.sql" perkdsp
pg_dump -U perkdsp -svf "staging_schema.sql" perkdsp_staging
java -jar apgdiff-2.4.jar production_schema.sql staging_schema.sql > diff.sql