Skip to content

Instantly share code, notes, and snippets.

View nikhilatjumpcut's full-sized avatar
👻
straight to the ramp

Nikhil Arora nikhilatjumpcut

👻
straight to the ramp
View GitHub Profile
Item{19}
author (Map){6}
adminLevel (Number): 2
fName (String): John
id (String): e22e1f3b-e248-4a81-b243-9c6a60c8d377
@nikhilatjumpcut
nikhilatjumpcut / comments_api.yml
Created September 29, 2018 00:21
Paris Comments API
swagger: '2.0'
info:
title: Paris Comments API
description: Provide virtual classroom feature for online education
version: "1.0.0"
# the domain of the service
host: api.jumpcut.com
# array of all schemes that your API supports
schemes:
- https
@nikhilatjumpcut
nikhilatjumpcut / create_migration.sh
Created October 4, 2018 20:52 — forked from MarkyMarkMcDonald/create_migration.sh
Create Flyway migration versioned by timestamp: ./bin/create_migration.sh "Add_Unique_Constraint_To_User_Email"
#!/bin/bash
echo "-- New Migration" > "`dirname $0`/../src/main/resources/db/migrations/V`date +%s`__$1.sql"
@nikhilatjumpcut
nikhilatjumpcut / spacetime.gql
Created August 3, 2019 06:06
spacetime.gql
mutation createHtmlTag {
createHtmlTag(
data: {
title: "SPACETIME"
selector: "head"
isGlobal: false
position: PREPEND_TO
html: "<script\n src=\"https://unpkg.com/spacetime@5.9.1/builds/spacetime.min.js\"\n ></script>"
}
) {
mutation createHtmlTag{
createHtmlTag(data: {
title: "JQUERY"
isGlobal: true
selector: "head"
position: PREPEND_TO
html: "<script\n src=\"https://code.jquery.com/jquery-1.11.2.min.js\"\n crossorigin=\"anonymous\"></script>"
}) {
htmlTagId
}
@nikhilatjumpcut
nikhilatjumpcut / replaceReleaseDates.js
Created August 3, 2019 14:32
replaceReleaseDates.js
function getElementByTagAndText(tag, text) {
var xPath = "//" + tag + "[contains(text(), '" + text + "')]";
return document.evaluate(xPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
function getDate(timewaitValue) {
if (!timewaitValue || !spacetime) {
return 'soon';
}
function fixCFHeaders() {
var $head = document.getElementsByTagName('head')[0];
var $firstMeta = document.getElementsByTagName('meta')[0];
var $node = document.createElement('meta');
$node.setAttribute('property', 'fb:app_id');
$node.setAttribute('content', '1688345434786806');
$head.insertBefore($node, $firstMeta);
}
@nikhilatjumpcut
nikhilatjumpcut / setFBCommentOptions.js
Created August 5, 2019 05:21
setFBCommentOptions.js
# mutation createHtmlTag{
# createHtmlTag(data: {
# title: "FB_OPTIONS"
# isGlobal: false
# position: PREPEND_TO
# selector: "head"
# html: "<script>$(document).ready(function setFBCommentOptions() {\n $fbCommentSection = document.querySelector('.fb-comments');\n\n $fbCommentSection.setAttribute('data-order-by', 'reverse_time');\n $fbCommentSection.setAttribute('data-width', '100%');\n\n // Forcing fb comments iframe to have 100% width because facebook just won't fix\n // their own bug https: //developers.facebook.com/support/bugs/256568534516879/#_=_\n $fbCommentsWidthStyleTag = '<style>.fb-comments iframe {width: 100% !important;}</style>';\n $('head').append($fbCommentsWidthStyleTag);\n});</script>"
# }) {
# htmlTagId
# }
@nikhilatjumpcut
nikhilatjumpcut / countdown.js
Last active August 5, 2019 11:11
enroll_countdown.js
(function startCountdown() {
var funnelAccess = window.__TSUNAMI__.funnelAccess;
var currentStep = funnelAccess.find(function(access) {
if (access.isCurrentStep) {
return true;
}
return false;
});
@nikhilatjumpcut
nikhilatjumpcut / vaCTADelayScript.js
Last active August 5, 2019 11:30
vaCTADelayScript.js
(function vaCTADelayScript() {
var funnelAccess = window.__TSUNAMI__.funnelAccess;
var currentStep = funnelAccess.find(function(access) {
if (access.isCurrentStep) {
return true;
}
return false;
});