sudo killal mds
sudo killall -9 mds
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
# → https://insulalabs.io/#keys | |
export INSULA_API_KEY=... | |
insi_set() { | |
if [ "$#" -ne 2 ]; then | |
echo "Missing key and/or value. Usage: $0 KEY VALUE" >&2 | |
return 1 | |
fi | |
# Set a value |
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 "fmt" | |
func main() { | |
a1 := []int{1, 2, 3, 4, 5} | |
a2 := a1[1:3] | |
a2 = append(a2, 10, 20) | |
fmt.Println(a1) // [1 2 3 10 20] | |
fmt.Println(a2) // [2 3 10 20] |
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 "fmt" | |
import "strings" | |
// go run str_to_upper.go | |
// Compare with C++: https://gist.github.com/siberex/7684eadde46d5e119b3bc4c6d5ab6212 | |
func main() { | |
strTestUpper1 := "hello🌍world" | |
strTestUpper2 := "naïve café" |
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
/** | |
* strings | |
* | |
* Author: Stephen Jingle <sib.li> | |
* Created: 13 Jul 2025 | |
*/ | |
#include <cctype> | |
#include <cwctype> |
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 <string> | |
#include <string_view> | |
#include <locale> | |
#include <codecvt> | |
#include <algorithm> | |
class UTF8ToUpperCase { | |
private: | |
static thread_local std::string result_buffer; | |
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 <cctype> | |
#include <cstdint> | |
#include <iostream> | |
#include <string> | |
#include <string_view> | |
static char32_t to_upper(char32_t cp) { | |
if (cp >= 'a' && cp <= 'z') { | |
return cp - ('a' - 'A'); | |
} |
Link: https://gist.github.com/siberex/7ff8b24778a31124b178a299442159d6
Aspect | Abseil | Boost |
---|---|---|
Purpose | Modern C++ utilities for performance, simplicity, and Google-style coding. | Broad, comprehensive set of libraries for general-purpose C++ development. |
Design Philosophy | Focuses on modern C++ (C++11/14/17), clean APIs, and production-grade code. | Older, supports pre-C++11, with some legacy and verbose APIs. |
Size & Scope | Leaner, focused on core utilities (e.g., containers, strings, time). | Massive, with over 160 libraries (e.g., networking, math, filesystem). |
License |
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
// AoC2024. Day 6. Deoptimized version | |
let INPUT = await fetch('https://adventofcode.com/2024/day/6/input') | |
.then(response => response.text()) | |
.catch(err => console.error(err)); | |
/* | |
INPUT = `....#..... | |
.........# | |
.......... |
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/bash | |
# Main loop to continuously monitor the temperature | |
while true; do | |
clear | |
echo "Monitoring Coral PCIe Accelerators Temperature" | |
# Dynamically find all apex devices and read their temperatures | |
for device_path in /sys/class/apex/apex_*; do | |
if [ -f "$device_path/temp" ]; then |
NewerOlder