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
services: | |
nginx: | |
image: nginx:latest | |
volumes: | |
- ./nginx.conf:/etc/nginx/nginx.conf:ro | |
ports: | |
- "16686:16686" # Both Jaeger UI and exporter are on the same port. | |
depends_on: | |
- jaeger |
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
// Self-destructible service worker stub | |
self.addEventListener('install', function(e) { | |
self.skipWaiting(); | |
}) | |
self.addEventListener('activate', function(e) { | |
self.registration.unregister() | |
.then(function () { | |
return self.clients.matchAll(); | |
}) |
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 { tags as t } from '@lezer/highlight' | |
import { createTheme } from '@uiw/codemirror-themes' | |
export { vscodeDark } from '@uiw/codemirror-theme-vscode' | |
// VSCode light theme based on dark theme from '@uiw/codemirror-theme-vscode'. | |
// See: https://github.com/uiwjs/react-codemirror/blob/master/themes/vscode/src/index.ts | |
export const vscodeLight = createTheme({ | |
theme: 'light', | |
settings: { |
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
$signature = @" | |
[DllImport("user32.dll")] | |
public static extern bool SystemParametersInfo(int uAction, int uParam, ref | |
int lpvParam, int flags ); | |
"@ | |
$systemParamInfo = Add-Type -memberDefinition $signature -Name SloppyFocusMouse -passThru | |
[Int32]$newVal = 1 | |
$systemParamInfo::SystemParametersInfo(0x1001, 0, [REF]$newVal, 2) |
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 decimal | |
def binary_split(a, b): | |
if b == a + 1: | |
Pab = -(6*a - 5)*(2*a - 1)*(6*a - 1) | |
Qab = 10939058860032000 * a**3 | |
Rab = Pab * (545140134*a + 13591409) | |
else: | |
m = (a + b) // 2 |
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" | |
"unsafe" | |
) | |
// Copy of hchan struct with first necessary fields. | |
// See: "src/runtime/chan.go" | |
type hchan 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
const { log, assert } = console | |
const { abs, max, sqrt } = Math | |
const dbg = (v) => console.log(typeof v, v) | |
const pow2 = v => v * v | |
const sum = (a,b) => a + b | |
const sub = (a,b) => a - b | |
const mul = (a,b) => a * b | |
const range = (length, fn) => Array.from({length}, (_, i) => fn(i)) |
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" | |
"runtime" | |
"testing" | |
) | |
func BenchmarkAppend(b *testing.B) { | |
for i := 0; i < b.N; i++ { |
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" | |
"io" | |
"os" | |
_ "unsafe" | |
) |
NewerOlder