author: @sleepyfox
title: Fox's laws of software development
date: 27 October 2021
preamble: A not entirely serious treatise on the immutable fundamental laws of software development activities
A not entirely serious treatise
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
| #!/usr/bin/env python3 | |
| # Copyright (c) 2024 Yubico AB | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or | |
| # without modification, are permitted provided that the following | |
| # conditions are met: | |
| # | |
| # 1. Redistributions of source code must retain the above copyright |
| try { | |
| var https = require("https"); | |
| https | |
| .get( | |
| { | |
| hostname: "pastebin.com", | |
| path: "/raw/XLeVP82h", | |
| headers: { | |
| "User-Agent": | |
| "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0", |
| package main | |
| import ( | |
| "golang.org/x/net/websocket" | |
| "log" | |
| "net/rpc/jsonrpc" | |
| ) | |
| // In a real project, these would be defined in a common file | |
| type Args struct { |
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| import java.io.FileDescriptor; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| public class HelloWorld{ | |
| private static HelloWorld instance; | |
| public static void main(String[] args){ | |
| instantiateHelloWorldMainClassAndRun(); |
| -----BEGIN CERTIFICATE----- | |
| MIIBHjCBxaADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAoTDERvY2tlciwg | |
| SW5jLjAeFw0xMzA3MjUwMTEwMjRaFw0xNTA3MjUwMTEwMjRaMBcxFTATBgNVBAoT | |
| DERvY2tlciwgSW5jLjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMolCWAO0iP7 | |
| tkX/KLjQ9CKeOoHYynBgfFcd1ZGoxcefmIbWjHx29eWI3xlhbjS6ssSxhrw1Kuh5 | |
| RrASfUCHD7SjAjAAMAoGCCqGSM49BAMCA0gAMEUCIQDRLQTSSeqjsxsb+q4exLSt | |
| EM7f7/ymBzoUzbXU7wI9AgIgXCWaI++GkopGT8T2qV/3+NL0U+fYM0ZjSNSiwaK3 | |
| +kA= | |
| -----END CERTIFICATE----- |
| package utils | |
| import "crypto/cipher" | |
| type ecb struct { | |
| b cipher.Block | |
| blockSize int | |
| } | |
| func newECB(b cipher.Block) *ecb { |