This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright © 2021 Chirag Bhatia | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage: add a bookmarklet to the following link. Then, open Calven and click the bookmark to load the extension. | |
* javascript:fetch('https://gist.githubusercontent.com/DarkMatterMatt/5f45b7e0d84dc1ce535edf2b0750f1d7/raw').then(r => r.text()).then(eval) | |
*/ | |
(async () => { | |
if (!window.location.hostname.endsWith('.calven.com')) { | |
alert('Please run this bookmarklet on *.calven.com'); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Panopto | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://*.panopto.com/Panopto/Pages/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=panopto.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type definitions for gtfs 3.1.4 | |
// Project: https://github.com/BlinkTagInc/node-gtfs | |
// Definitions by: Matt Moran <https://github.com/DarkMatterMatt> | |
import parse from "csv-parse"; | |
import { Database } from "sqlite"; | |
declare module "gtfs" { | |
type SqlValue = undefined | null | string | number | boolean | Date | SqlValue[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Point = { | |
x: number; | |
y: number; | |
} | |
type Vector = number[]; | |
type Matrix = Vector[]; | |
type Vector2D = [number, number]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package win.mattm.java; | |
import javafx.collections.ObservableList; | |
import javafx.event.EventHandler; | |
import javafx.event.EventType; | |
import javafx.scene.Cursor; | |
import javafx.scene.Node; | |
import javafx.scene.Parent; | |
import javafx.scene.Scene; | |
import javafx.scene.input.MouseEvent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toPx(a) { | |
return a.toString() + "px"; | |
} | |
function showLine(x, y, width, height, color) { | |
const $a = document.createElement("div"); | |
document.body.append($a); | |
$a.style.width = toPx(width); | |
$a.style.height = toPx(height); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A pre-commit hook to prevent uploading secrets (API keys) by accident | |
read -r -d "" SECRETS <<"EOF" | |
YOUR_API_KEY | |
SECRET2 | |
EOF | |
# find changed files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
/** | |
* Reorders CSS attributes according to the LINE_ORDER defined below. | |
* - Existing line breaks and whitespace is preserved | |
* - Attributes must on a single line | |
* - Opening braces must be at the end of their line | |
* - Closing braces must be on a newline | |
* - The original file is renamed with a .bak file extension | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backend | Mobile | Desktop | Web | ||
---|---|---|---|---|---|
Displays the user:pass | N/A | N | N | N | |
Link contains the user:pass | Y | N | Y | Y | |
Accepts percent encoded symbols (%78) | Y | Y | Y | Y | |
Accepts unicode percent encoding (%u0078) | Y | Y | N | N |
NewerOlder