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 main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
) | |
const URL_TEMPLATE = "https://aviationweather.gov/api/data/windtemp?level=high&fcst=06®ion=%s" |
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/sh | |
# Open Chrome in profile depending on the name it's invoked as. | |
# Echo URL regardless of profile | |
echo "${url:=$1}" | |
# Select profile by binary name. | |
# If invoked as..... Open in profile... | |
# wopen work |
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 main | |
// #include <linux/reboot.h> | |
// typedef unsigned int* magic; | |
// void get_magicks(magic amulet) { | |
// *amulet++ = LINUX_REBOOT_MAGIC1; | |
// *amulet++ = LINUX_REBOOT_MAGIC2; | |
// *amulet++ = LINUX_REBOOT_MAGIC2A; | |
// *amulet++ = LINUX_REBOOT_MAGIC2B; | |
// *amulet++ = LINUX_REBOOT_MAGIC2C; |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
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
import java.util.List; | |
public class Util { | |
public static void f(List<Double> x) { } | |
public static void f(List<Long> x) { } | |
} | |
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
#!/usr/bin/env python3 | |
import aiohttp | |
import asyncio | |
import statistics | |
import time | |
from aiohttp import request | |
from typing import Dict, List |
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 -e | |
TITLE=`basename $0` | |
while getopts "hs:t:" opt; do | |
case "${opt}" in | |
s) SUBTITLE="${OPTARG}";; | |
t) TITLE="${OPTARG}";; | |
*) echo "Usage: $0 [-t TITLE] [-s SUBTITLE] BODY" && exit 1;; | |
esac |
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
module type CALC = sig | |
type stack | |
val display_stack: (stack -> string) | |
val evaluate: (string -> string) | |
end | |
module Calc : CALC = struct | |
open Core.Std |
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
object Chutes { | |
val adjust = Map( | |
1 -> 38, 4 -> 14, 9 -> 31, 16 -> 6, 21 -> 42, 28 -> 84, 36 -> 44, | |
48 -> 26, 49 -> 11, 51 -> 67, 56 -> 53, 62 -> 19, 64 -> 60, 71 -> 91, | |
80 -> 100, 87 -> 24, 93 -> 73, 95 -> 75, 98 -> 78 | |
) | |
val rand = new util.Random | |
val runCount = 10000 | |
@annotation.tailrec |
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
object Example { | |
def main(args: Array[String]): Unit = { | |
println("Scala!") | |
// create some values to use | |
// TERM: assignment | |
val a = 1 | |
val b = 2 | |
val c = 3 |
NewerOlder