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 "core:fmt" | |
import "core:simd" | |
main :: proc() { | |
i := index_any([]u8{'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', '\r', '&', 'a'}, 16) | |
fmt.println(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
#!/bin/bash | |
# コマンドライン引数を配列に格納 | |
args=("$@") | |
# 配列の要素を表示 | |
for arg in "${args[@]}"; do | |
echo $arg | |
done |
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) | |
} |
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 |
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 {", |
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 |
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 { |
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" |
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. |
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); } |
NewerOlder