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 bash | |
# Note: be sure to add `.exe/` to your `.gitignore` file, otherwise this script will not work properly. | |
set -euo pipefail | |
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" | |
input_sha=$( | |
( |
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 ( | |
"bufio" | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func slicesMap[T, U any](ts []T, f func(T) U) []U { |
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" | |
type Thinger interface { | |
DoStuff() | |
DoThings() | |
} | |
type thing1 struct {} |
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 | |
set -Eeuo pipefail | |
cat > with.go <<EOF | |
package main | |
import ( | |
"fmt" | |
"strings" |
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
# This file is a hack that enables .eslintrc in a create-react-app in dev mode on Windows 10. | |
# Written and tested against react-scripts@2.0.5 | |
# | |
# Make sure you replace the default "start" script in package.json with: | |
# "start": "PowerShell.exe \"%CD%\\enable-eslintrc.ps1\" && react-scripts start", | |
$file = "node_modules\react-scripts\config\webpack.config.dev.js" | |
(Get-Content $file) -replace "useEslintrc: false", "useEslintrc: true" | Set-Content $file |
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
license: gpl-3.0 | |
height: 960 |