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 / 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 / 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 / submitOptin.js
Last active August 6, 2019 12:44
submitOptin.js
# mutation createHtmlTag{
# createHtmlTag(data: {
# title: "SUBMIT_OPTIN"
# isGlobal: false
# selector: "head"
# position: APPEND_TO
# html: "<script>function validateEmail(e){return new RegExp(\"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,3}\",\"i\").test(e)}function validateUUID(e){return new RegExp(\"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\",\"i\").test(e)}function once(e){var a;if(\"function\"!=typeof e)return function(){};var t=2;return function(){return--t>0&&(a=e.apply(this,arguments)),t<=1&&(e=void 0),a}}var submitLink=null,nameInput=null,emailInput=null;$(document).ready(function(){submitLink=$(\"a[href=#submit-form]\"),nameInput=$(\"input[name=first_name]\"),emailInput=$(\"input[name=email]\"),submitLink.click(function(e){console.log(\"hello\"),e.preventDefault(),e.stopPropagation();var a=nameInput.val(),t=emailInput.val().replace(/s/g,\"\"),r=!1;if(\"\"==a?(nameInput.css({\"border-color\":\"#B91517\",\"border-width\":\"3px\"}),r=!0):nameInput.css({\
@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 / replaceReleaseDatesAndWrapperLinks.js
Last active August 7, 2019 03:26
replaceReleaseDatesAndWrapperLinks.js