Skip to content

Instantly share code, notes, and snippets.

@kevincolten
kevincolten / .env.example
Last active October 5, 2024 15:47
Canvas Docker
CANVAS_STABLE_VERSION=2024-08-28
PGHOST=
PGPORT=
PGUSER=
PGPASSWORD=
PGDB=
RCE_APP_HOST="/rce"
@kevincolten
kevincolten / index.js
Created September 5, 2024 14:11
Metabase Export/Import Example
// METABASE_API_KEY='' METABASE_URL='' COLLECTION_ID='' node index.js
const { writeFileSync, readFileSync, cpSync, mkdirSync, existsSync } = require('fs');
const tar = require('tar');
const path = require('path');
const request = require('request-promise-native');
const { METABASE_API_KEY, METABASE_URL, COLLECTION_ID } = process.env;
const SERIALIZATION_API_URL = `${METABASE_URL}/api/ee/serialization`;
const exportCollection = async (collectionId) => {
@kevincolten
kevincolten / contact-form.html
Created August 28, 2024 22:10
Hubspot Forms
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
region: "na1",
portalId: "24084423",
formId: "6a3edefc-d6eb-4eec-a23c-8a39d5ac65df",
onFormReady: async ($form) => {
const recaptcha = $form.querySelector('.hs-recaptcha');
if (recaptcha) recaptcha.style.display = "none";
$form.insertAdjacentHTML('beforebegin', `
@kevincolten
kevincolten / Dockerfile
Last active August 15, 2024 06:08
Canvas Docker
FROM phusion/passenger-full:latest as build
ARG CANVAS_STABLE_VERSION
ARG PGDB
ARG PGPORT
ARG PGHOST
ARG PGUSER
ARG PGPASSWORD
ARG SMTP_HOST
ARG SMTP_PORT
@kevincolten
kevincolten / image2pointcloud.ipynb
Last active May 1, 2024 01:14
imageortext2mesh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevincolten
kevincolten / template.jinja2
Last active July 15, 2020 15:07
Certificate Template
<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from student.models import anonymous_id_for_user
from opaque_keys.edx.keys import CourseKey
from hashlib import sha256
from datetime import date
%>
<%
# set doc language direction
@kevincolten
kevincolten / index.md
Last active July 1, 2020 13:35
Vandelay Software Developer Test

Vandelay Education Software Developer Challenge

Build a SQL GUI in the browser that can save queries

Documentation

You can refer to this old SQL workshop for documentation on the sample sqlite database. Play close attention to the Online SQL Interpreter, also located here. That's similar to part of what we want to build!

@kevincolten
kevincolten / index.html
Created February 5, 2020 03:40
Matrix CSS
<div class="matrix">
<div class="d1 c1 de" style="left:6%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d3 f1" style="left:12%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d1 f2 c1" style="left:18%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d2 f1" style="left:24%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d4 c3 de" style="left:30%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d2 c1" style="left:36%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d3 f2 c1" style="left:36%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d1 c1" style="left:42%;">circl<span>e</span>codingaca<span>d</span>emy</div>
<div class="d3 de" style="left:48%;">circl<span>e</span>codingaca<span>d</span>emy</div>
@kevincolten
kevincolten / areaCodes.json
Created October 24, 2019 20:52
Geocoded Area Codes
{
"date_updated": "2012-04-18",
"area_codes": [
{
"area_code": 201,
"city": "Jersey city, NJ",
"lat": 40.728157499999988,
"lng": -74.077641700000001
},
{
@kevincolten
kevincolten / index.html
Last active July 25, 2019 20:22
Calculator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
html {