opencode auth login
# Select "Kimi For Coding"
# Enter your API key (sk-kimi-...)Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.
Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1
- Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
- Select "Create new custom chat mode file"
For excessively paranoid client authentication.
Original: https://gist.github.com/mtigas/952344
openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
This file contains hidden or 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 <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <math.h> | |
| typedef uint8_t u08; | |
| typedef uint32_t u32; | |
| typedef uint64_t u64; | |
| typedef int32_t i32; |
This file contains hidden or 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
| Poly File Layer | |
| Idea: A single file content to represent a set of identical or similar files. | |
| * Files can be templated. Files generated by the template are identical in the PFL (Poly File Layer) | |
| * Files that have common lines, can be linked and marked as a Poly File. | |
| Prior Art | |
| * [ ] Read the paper | |
| * Extracting a Unified Directory Tree to Compare Similar Software Products: https://sel.ist.osaka-u.ac.jp/lab-db/betuzuri/archive/1012/1012.pdf | |
| * Fast Search in Hamming Space with Multi-Index Hashing: http://www.cs.toronto.edu/~norouzi/research/papers/multi_index_hashing.pdf |
This file contains hidden or 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 ( | |
| "crypto/x509" | |
| "encoding/pem" | |
| "errors" | |
| "fmt" | |
| "golang.org/x/crypto/ssh" | |
| "io/ioutil" | |
| "net" |
This file contains hidden or 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
| trap("SIGINT") { exit! } | |
| total_width = `stty size`.scan(/\d+/)[1].to_i # terminal width | |
| snowflakes = {} | |
| puts "\033[2J"; # clearing output | |
| loop do | |
| snowflakes[rand(total_width)] = 0 |
This file contains hidden or 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/sh | |
| set -e | |
| # Documentation and guides: | |
| # https://docs.kernel.org/admin-guide/cgroup-v2.html | |
| # https://lore.kernel.org/lkml/[email protected]/T/ | |
| # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/using-cgroups-v2-to-control-distribution-of-cpu-time-for-applications_managing-monitoring-and-updating-the-kernel | |
| # remove if already exists | |
| [ -e /sys/fs/cgroup/test1 ] && rmdir /sys/fs/cgroup/test1 |
This file contains hidden or 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/ash | |
| # list installed packages sorted by file size | |
| apk info -e -s \* >/tmp/apksize | |
| awk 'NR % 3 == 1' /tmp/apksize | cut -d ' ' -f 1 > /tmp/apkname | |
| awk 'NR % 3 == 2' /tmp/apksize > /tmp/apksize2 | |
| while read -r n unit; do | |
| B=$n | |
| case "$unit" in |
This file contains hidden or 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 | |
| type lruNode[K comparable, V any] struct { | |
| prev *lruNode[K, V] | |
| next *lruNode[K, V] | |
| key K | |
| value V | |
| } | |
| type LRUCache[K comparable, V any] struct { |
NewerOlder