This file contains hidden or 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 json | |
| import os | |
| import sys | |
| from typing import Dict, List, Tuple | |
| def main(): | |
| query = "" | |
| if len(sys.argv) > 1: | |
| query = sys.argv[1].lstrip(".") |
This file contains hidden or 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 ( | |
| "image" | |
| "image/color" | |
| "log" | |
| "os" | |
| "golang.org/x/image/bmp" | |
| ) |
This file contains hidden or 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
| # Copied from https://github.com/StevenBlack/hosts | |
| 127.0.0.1 localhost | |
| 127.0.0.1 localhost.localdomain | |
| 127.0.0.1 local | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| ::1 ip6-localhost | |
| ::1 ip6-loopback | |
| fe80::1%lo0 localhost |
This file contains hidden or 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
| # Copied from https://github.com/StevenBlack/hosts | |
| 127.0.0.1 localhost | |
| 127.0.0.1 localhost.localdomain | |
| 127.0.0.1 local | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| ::1 ip6-localhost | |
| ::1 ip6-loopback | |
| fe80::1%lo0 localhost |
This file contains hidden or 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
| version: "3" | |
| networks: | |
| dns_net: | |
| driver: bridge | |
| ipam: | |
| config: | |
| - subnet: 172.31.41.0/24 | |
| services: |
This file contains hidden or 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 | |
| # Based on https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/ | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: tiny-ca.sh <domain>" | |
| exit 1 | |
| fi | |
| DOMAIN=$1 |
This file contains hidden or 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
| DATA = $(shell pwd)/data | |
| LOGS = $(shell pwd)/logs | |
| TZ = America/Los_Angeles | |
| NAME = unifi | |
| IMAGE = jacobalberty/unifi:stable | |
| .PHONY: run | |
| run: | |
| docker run -d --rm --init \ |
This file contains hidden or 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 rex | |
| import ( | |
| "bytes" | |
| "net/http" | |
| "strings" | |
| "time" | |
| ) | |
| type Request struct { |
This file contains hidden or 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 me.kaiwells.cache; | |
| import lombok.AllArgsConstructor; | |
| import lombok.Data; | |
| import org.apache.commons.lang3.SerializationUtils; | |
| import org.springframework.stereotype.Component; | |
| import javax.validation.constraints.NotNull; | |
| import java.io.Serializable; | |
| import java.time.Instant; |
This file contains hidden or 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
| 2.4 ns per bit shift | |
| 6.3 ns per multiply by 2 | |
| 25 ns per == comparison | |
| 2 ns per === comparison | |
| 45 ns per parseInt | |
| 2 ns per Math.floor | |
| // both work as array indices |
NewerOlder