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 / post.md
Last active October 24, 2023 00:11
@post Hosting Multiple Repositories With GitHub Pages

GitHub Pages is great for building a personal or project website. It'll default to http://username.github.io, or you can even use your own custom domain name from services like Namecheap, which I will write about in another post soon.

So you set up your GitHub Page for yourself or project, but what if you want to show off some of your other projects you are working on. You can go the poor man's route, and simply just copy everything from another repository into a folder in your username.github.io repository, commit and push the changes to GitHub, and you'll be able to navigate to http://username.github.io/project.

But this comes with some seriously inconvienent and non-conventional drawbacks, such as duplication of code across repositories and manually copy/paste-ing everytime changes are made to update your hosted codebase. Good luck maintaining that.

The other

@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!

This file has been truncated, but you can view the full file.
# hpHosts - Ad and Tracking servers only
#
# The following are hosts in the hpHosts database with the ATS classification ONLY.
# This file will NOT protect you against malicious domains
#
127.0.0.1 localhost #IPv4 localhost
::1 localhost #IPv6 localhost
#
# AD SERVERS START HERE
#
@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
},
{