Skip to content

Instantly share code, notes, and snippets.

View gkobilansky's full-sized avatar

Gene Kobilansky gkobilansky

View GitHub Profile
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { Error as STError } from 'supertokens-node';
import { verifySession } from 'supertokens-node/recipe/session/framework/express';
import { VerifySessionOptions } from 'supertokens-node/recipe/session';
import * as JsonWebToken from 'jsonwebtoken';
import * as jwks from 'jwks-rsa';
import * as Sentry from '@sentry/node';
@Injectable()
export class AuthGuard implements CanActivate {
@gkobilansky
gkobilansky / email.service.ts
Created August 1, 2023 21:54
Email Service
import { Injectable } from '@nestjs/common';
import * as sgMail from '@sendgrid/mail';
import * as Sentry from '@sentry/node';
import { PRODUCTION_ENV_NAME, DOMAIN_AND_EMAIL_WHITE_LIST } from '../settings';
const templateIds = {
programPurchase: 'd-e8cd31b0131a48bba6041692ed38c9f6',
injuryMarked: 'd-ccef4e3e556f42ee8e5750b9a0009d37',
};
@gkobilansky
gkobilansky / mux.js
Created May 15, 2023 19:02
mux data
/* eslint-disable import/prefer-default-export */
import getConfig from 'next/config';
import mux from 'mux-embed';
import Hls from 'hls.js';
const { publicRuntimeConfig } = getConfig();
export const getMonitoring = context => {
let metadata = {};
"dependencies": {
"@aws-sdk/client-transcribe": "^3.50.0",
"@mux/mux-node": "^3.2.1",
"@nestjs/common": "^8.0.2",
"@nestjs/core": "^8.0.2",
"@nestjs/jwt": "^8.0.0",
"@nestjs/passport": "^8.0.0",
"@nestjs/platform-express": "^8.0.2",
"@nestjs/typeorm": "^8.0.1",
"@sendgrid/mail": "^6.3.1",
// We look for two things when checking the loading state: 1. Are there any open XMLHttpRequests? 2. Are there any DOM elements with the word loading either in their class or id?
//If no we call our callback function. If yes, we rerun checkLoadingState once every second until alls clear.
function checkLoadingState(callback) {
// if there's no open requests and no elements with ID/Class of loading, callback
if (window.openHTTPs < 1 && checkDomForNoLoading()) {
callback();
} else {
setTimeout(function () {
console.log('rechecking loading state')

Keybase proof

I hereby claim:

  • I am gkobilansky on github.
  • I am lancekey (https://keybase.io/lancekey) on keybase.
  • I have a public key ASAzL3mfNiy0dalVk0xpjlRv0ZxwFdLCVjBV_7Z4A8Wxjgo

To claim this, I am signing this object:

<div class="flexslider" id="flexslider--{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="slideshow-section" data-transition="{{ section.settings.slider_home_transition }}" data-autoplay="{{ section.settings.slider_home_auto }}" data-speed="{{ section.settings.slider_home_rate }}" data-show-dots="{{ section.settings.slider_home_show_dots }}">
<ul class="slides">
{% for block in section.blocks %}
{% if block.settings.image != blank %}
<li id="slide--{{ block.id }}" data-flexslider-index="{{ forloop.index0 }}" {{ block.shopify_attributes }}>
{% if block.settings.link != blank %}
{% if block.setting.link contains 'http' %}
<a href="{{ block.settings.link }}" class="slide-link slide-link--{{ block.id }}" target="_blank">
{% else %}
<a href="{{ block.settings.link }}" class="slide-link slide-link--{{ block.id }}">
@import 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,700';
form.wufoo {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;
width: 98%;
}
label.desc, form li div label {
font-weight: 300;
}
/* Animations
* ------------------------------------------------------- */
var ssAnimations = function() {
if (!$("html").hasClass('no-cssanimations')) {
$('.animate-this').waypoint({
handler: function(direction) {
var defAnimationEfx = cfg.defAnimation;
var events = require('events');
var request = require('request');
var Trello = require('node-trello');
// Fill these in
var trelloKey = //AppKEY;
var trelloToken = //UserToken;
var idBoard = //BoardId;
var trello = new Trello(trelloKey, trelloToken);