Skip to content

Instantly share code, notes, and snippets.

const commitFieldName = "TEMP: Git commits"
const slackChannel = "C06SBHMQU8G"
const Airtable = require('airtable');
Airtable.configure({
apiKey: process.env.AIRTABLE_API_KEY
})
@maxwofford
maxwofford / invite.sh
Created June 19, 2024 17:17
email inviter
#!/bin/bash
for email in $(cat $1); do
echo "inviting: $email"
curl -X POST 'https://arcadius.hackclub.com/slack-invite' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SLACK_KEY" \
-d "{\"email\":\"${email}\"}"
@maxwofford
maxwofford / xoxc.js
Created January 10, 2024 16:38
Pull the XOXC token from Slack
// open slack in the browser and paste this into your console for the XOXC token
localConfig = JSON.parse(localStorage.getItem('localConfig_v2'))
localConfig.teams[localConfig.lastActiveTeamId].token
first:
- Imagination
- Intelligence
- Integrity
- Innovation
- Inclusion
- Impact
- Curiosity
- Mystery
- Family
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby File.read(File.join(File.dirname(__FILE__), ".ruby-version")).strip
gem "dotenv-rails", groups: [:development, :test]
# gem 'sassc-rails' # required for rails 6
/*
@title: Sokoban+
@author: Leonard (Omay)
25 levels
3 types of boxes and 3 types of goals
Press WASD to move, J to restart and K to toggle trails
Get A boxes (cyan) to A goals (green)
Get B boxes (magenta) to B goals (red)

How do I track what a demo account is?

The Utopian future

  • Users individually sign contracts
  • Contracts are just for creating accounts– you can still invite a team member who doesn’t have a contract
  • You can signup without a contract, but an account isn’t active until at least 1 contract-signed users are onboard

The MVP

import { readLines } from "https://deno.land/[email protected]/io/buffer.ts";
async function main() {
for await (const line of readLines(Deno.stdin)) {
let parts = line.split(" ");
if (parts.length == 14) {
let timestamp = new Date(parts[0]).getTime() / 1000;
let ip = parts[7].replace("fwd=", "").replace(/"/g, "");
let request = parts[4].replace("path=", "").replace(/"/g, "");
body {
font-family: 'Avenir Next', system-ui;
}
h1 {
color: #ec3750;
}
img {
animation: spin 10s linear infinite;

Ideal vp9 encoding:

ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 1 -speed 4 \
  -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 \
  -g 9999 -aq-mode 0 -an -f webm /dev/null


ffmpeg -i <source> -c:v libvpx-vp9 -pass 2 -b:v 1000K -threads 1 -speed 0 \
  -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 \
 -g 9999 -aq-mode 0 -c:a libopus -b:a 64k -f webm out.webm