View must.go
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 testx | |
import "testing" | |
func Must0(t *testing.T) func(error) { | |
return func(err error) { | |
t.Helper() | |
if err != nil { | |
t.Fatal(err) | |
} |
View wezterm.lua
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
local wezterm = require 'wezterm' | |
local mux = wezterm.mux | |
local config = {} | |
if wezterm.config_builder then | |
config = wezterm.config_builder() | |
end | |
-- set startup Window position | |
-- https://github.com/wez/wezterm/issues/2976#issuecomment-1419492777 |
View go.json
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": { | |
"prefix": "package main", | |
"body": [ | |
"package main", | |
"", | |
"import \"log\"", | |
"", | |
"func main() {", | |
"\tif err := run(); err != nil {", |
View source_or_run.sh
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 | |
if [ $BASH_ARGV0 = -bash ]; then | |
echo sourced | |
else | |
echo executed | |
fi |
View main.go
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 ( | |
"io" | |
"log" | |
"os" | |
) | |
func main() { | |
if err := run(); err != nil { |
View 1677487639.json.diff
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
--- 1677487639.json 2023-02-27 17:51:03 | |
+++ with-ctrl-k.json 2023-02-27 17:54:54 | |
@@ -919,6 +919,42 @@ | |
{ | |
"type": "basic", | |
"from": { | |
+ "key_code": "k", | |
+ "modifiers": { | |
+ "mandatory": [ | |
+ "control" |
View bounded_array_example.zig
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
// Zig version: 0.10.1 | |
// Import the standard library. | |
const std = @import("std"); | |
// Define MyBoundedArray type. | |
const maxLength = 32; | |
const MyBoundedArray = std.BoundedArray(u8, maxLength); | |
/// Takes a slice as a parameter and fills it with a message. |
View ilog2_test.c
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
#include <math.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <gmp.h> | |
#include <mpfr.h> | |
int ilog2(uint64_t x) { return 63 - __builtin_clzll(x); } |
View mpfr_log2.c
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <gmp.h> | |
#include <mpfr.h> | |
int main (void) | |
{ | |
mpfr_t x, y; |
View index.html
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
<script> | |
window.onerror = () => alert("Hello, World!"); | |
function hello(x) { | |
if(typeof x === 'undefined') { | |
alert(x.f()); | |
} | |
} | |
hello(); | |
</script> |
NewerOlder