Skip to content

Instantly share code, notes, and snippets.

Education TLDs

  • .edu
  • .ac.[cc] (e.g. .ac.in, .ac.jp, .ac.id, .ac.uk) (Wikipedia)
  • .edu.[cc] (e.g. .edu.cn, .edu.au, .edu.my) (Wikipedia)
  • rak.de
  • ruhr-uni-bochum.de
  • nycstudents.net
  • .k12.[state].us (Wikipedia)
  • .cc.[state].us (Wikipedia)

Keybase proof

I hereby claim:

  • I am hkamran80 on github.
  • I am hkamran (https://keybase.io/hkamran) on keybase.
  • I have a public key ASBvNGvZbr8bVRDUF4btFiUwH_zDkiLfZ1hSLDo8f-vcPAo

To claim this, I am signing this object:

// Get all names on a Canvas roster from [Course] > People
// With filtering
console.log([...document.querySelectorAll("tbody tr.rosterUser")].filter(row => row.querySelector("td[data-test-id=section-column-cell]").textContent.includes("[your filter]")).map(row => row.querySelector("td:nth-child(2)").textContent.trim()).join("\n"));
// Without filtering
console.log([...document.querySelectorAll("tbody tr.rosterUser")].map(row => row.querySelector("td:nth-child(2)").textContent.trim()).join("\n"));
@hkamran80
hkamran80 / blurhashDataURL.ts
Last active August 17, 2022 04:29 — forked from gxvxc/blurhashDataURL.ts
Convert blurhash to a base64 DataURL string (no canvas or node-canvas)
import { decode } from "blurhash";
const cache: Record<string, string> = {};
export const blurHashToDataURL = (
hash: string | undefined,
): string | undefined => {
if (!hash) return undefined;
const cachedBlurDataURL = cache[hash];
@hkamran80
hkamran80 / App.java
Created March 25, 2022 19:23
Tic-Tac-Toe (JavaFX)
package com.hkamran;
import java.util.Arrays;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
@hkamran80
hkamran80 / ao3.user.js
Last active December 24, 2020 20:43
AO3 - Series Download Links
// ==UserScript==
// @name AO3 - Series Download Links
// @namespace https://hkamran.com
// @version 1.0.0
// @description Series Download Links for AO3, based on
// @author H. Kamran
// @downloadUrl https://gist.github.com/hkamran80/8e1c9055807679f5094da040072a8212/raw/ao3.user.js
// @updateUrl https://gist.github.com/hkamran80/8e1c9055807679f5094da040072a8212/raw/ao3.user.js
// @match https://archiveofourown.org/series/*
// @grant none
@hkamran80
hkamran80 / DarkModeExample.vue
Last active November 11, 2021 23:17
In combination with my revised article on Vuetify's dark mode state
<template>
<v-btn icon @click="toggleDarkMode">
<v-icon>mdi-theme-light-dark</v-icon>
</v-btn>
</template>
<script>
export default {
name: "Example",
methods: {
@hkamran80
hkamran80 / ao3.user.js
Last active January 3, 2021 08:59
Keystrokes for AO3
// ==UserScript==
// @name AO3 - Keystrokes
// @namespace https://hkamran.com
// @version 1.0.3
// @description Keystrokes for AO3
// @author H. Kamran
// @downloadUrl https://gist.github.com/hkamran80/a9bc0a6c13d1137d150980d425d7d025/raw/ao3.user.js
// @updateUrl https://gist.github.com/hkamran80/a9bc0a6c13d1137d150980d425d7d025/raw/ao3.user.js
// @match http*://archiveofourown.org/works/*
// @match http*://archiveofourown.org/collections/*
@hkamran80
hkamran80 / xkcd.user.js
Last active October 6, 2020 21:56
XKCD - Keystrokes
// ==UserScript==
// @name XKCD - Keystrokes
// @namespace https://hkamran.com
// @version 1.0.1
// @description Keystrokes for XKCD
// @author H. Kamran
// @downloadUrl https://gist.github.com/hkamran80/7746d7c2ba47e9ecdff547600635fd51/raw/xkcd.user.js
// @updateUrl https://gist.github.com/hkamran80/7746d7c2ba47e9ecdff547600635fd51/raw/xkcd.user.js
// @match https://xkcd.com/*
// @grant none
@hkamran80
hkamran80 / google_search.user.js
Last active August 22, 2020 04:06
Google Search - Keystrokes
// ==UserScript==
// @name Google Search - Keystrokes
// @namespace https://hkamran.com
// @version 1.0.1
// @description Keystrokes for Google Search
// @author H. Kamran
// @downloadUrl https://gist.github.com/hkamran80/c522d3285557070619af9ce5d7df3442/raw/google_search.user.js
// @updateUrl https://gist.github.com/hkamran80/c522d3285557070619af9ce5d7df3442/raw/google_search.user.js
// @match https://*.google.tld/search
// @grant none