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)
@hkamran80
hkamran80 / SmartTV2.txt
Last active February 28, 2024 01:03
Pi-hole Blocklist for Smart TVs
# THIS FILE IS NO LONGER BEING MAINTAINED. FOR A MAINTAINED VERSION, PLEASE USE THE VERSION IN THE NEW REPOSITORY.
# Repository: https://github.com/hkamran80/blocklists
# New link for this file: https://raw.githubusercontent.com/hkamran80/blocklists/main/smart-tv
# ------
# This is a blocklist to block Smart TVs sending data home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.

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;
# .IO Games Blocklist by H. Kamran (@hkamran80)
# License: GPLv3
# Contact: hkamran [at] unisontech.org
agar.io
diep.io
mope.io
surviv.io
doblons.io
deeeep.io
@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 / 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