Skip to content

Instantly share code, notes, and snippets.

const getAttendanceData = (sheet) => {
const lastColumn = sheet.getLastColumn();
const heading = sheet.getRange("A1:" + sheet.getRange(1, lastColumn).getA1Notation()).getValues()[0];
const data = sheet.getRange("A3:" + sheet.getRange(1, lastColumn).getA1Notation() + sheet.getLastRow()).getValues();
// Find the start date for the last 12 weeks
const today = new Date();
const twelveWeeksAgo = new Date(today.setDate(today.getDate() - 84));
// Filter the headings to get the columns within the last 12 weeks
2023-07-05 18:38.18: New job: Build bench.Dockerfile using autumn in
[https://github.com/ocaml/dune.git#refs/heads/main (bb0668329ee4a48bdd7727703ca131f025070e5e)]
2023-07-05 18:38.18: Using cache hint "https://github.com/ocaml/dune.git-bench.Dockerfile"
2023-07-05 18:38.18: Waiting for resource in pool OCluster
2023-07-05 18:38.18: Waiting for worker…
2023-07-05 18:38.18: Got resource from pool OCluster
Building on development-worker
HEAD is now at 2ff88051c bench: add GC stats to bench
HEAD is now at bb0668329 refactor: use Path.External.t for dump_memo_graph_file (#8117)
#1 [internal] load build definition from bench.Dockerfile
@punchagan
punchagan / .gitignore
Last active April 9, 2022 09:46
Ocurrent logs line numbers
/__pycache__/
@punchagan
punchagan / .gitignore
Last active February 23, 2024 15:22
Zoom Meetings Command Line
/.mypy_cache/
/.envrc
@punchagan
punchagan / .gitignore
Last active November 29, 2023 12:26
Whatsapp Broadcast Export to Zulip
*.zip
*.jpg
/*.txt
@punchagan
punchagan / upai-topscore.py
Created August 3, 2019 15:58
UPAI topscore request example
import requests
import json
# Obtain this from https://upai.usetopscore.com/u/oauth-key
client_id = 'XXX'
client_secret = 'YYY'
data = {
'grant_type': 'client_credentials',
@punchagan
punchagan / quidditch.clj
Created March 30, 2019 16:31
Quidditch simulation - ClojureBridge BLR workshop
(ns teaching-clojure.quidditch)
(def game-at-start
{:gryffindor {:score 0
:players 7}
:slytherin {:score 0
:players 7}})
(def opposition {:gryffindor :slytherin
:slytherin :gryffindor})
@punchagan
punchagan / nikola-to-hugo.py
Last active December 7, 2019 05:53
Nikola to Hugo tools
#!/usr/bin/env python3
""" Script to convert a Nikola blog to Hugo
Requirements:
- toml
Usage:
./nikola-to-hugo.py /path/to/nikola/blog
@punchagan
punchagan / kindle.js
Last active August 21, 2018 03:48
Readable view & Downloads for Kindle notebook (highlights) page
// Visit https://read.amazon.com/notebook
(function(){
var highlights_markdown = function(){
var markdown = "";
for (var i=0; i < highlights.length; i++){
markdown += "> " + highlights[i] + "\n\n";
var note = notes[i];
if (note !== "") {
markdown += note + "\n\n";
}
@punchagan
punchagan / prepare-commit-msg.sh
Last active April 23, 2019 04:01 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test release/candidate)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"