Skip to content

Instantly share code, notes, and snippets.

View classicvalues's full-sized avatar
🥇
Automating Python! Working Chatbot @ gemini-chatbot-mocha-three.vercel.app

Classic Values classicvalues

🥇
Automating Python! Working Chatbot @ gemini-chatbot-mocha-three.vercel.app
View GitHub Profile

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@classicvalues
classicvalues / crouton.md
Created February 5, 2022 19:03 — forked from tgirke/crouton.md
Crouton
#if 0
#include <string.h>
#else
void* memcpy(void* dest, const void* src, int count) {
char* dst8 = (char*)dest;
char* src8 = (char*)src;
while (count--) {
*dst8++ = *src8++;
}
@classicvalues
classicvalues / memcpyexample.c
Created February 4, 2022 21:28 — forked from andresv/memcpyexample.c
memcpy example
#include <stdio.h>
#include <string.h>
#include <stdint.h> //uint8_t and friends
int main(void){
uint8_t settings[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; // preamble, stx and other stuff must be defined here
char text[] = "hello world";
#include <string.h>
size_t strlen( const char *str )
{
size_t len;
while( str[len] ) len++;
return len;
}
@classicvalues
classicvalues / README.md
Created February 4, 2022 04:22 — forked from fiedl/README.md
macOS server replacement

macOS Server discontinues calendar and contacts services.

https://support.apple.com/en-us/HT208312

Prepare for changes to macOS Server 5.7.1

As hosted services have become widespread—and the need to keep software up to date is more important than ever—Apple is making some changes to macOS Server.

Learn about current and future support

Apple continues to develop and support macOS Server, which includes Open Directory, Profile Manager, and Xsan management. The most popular server features—Caching Server, File Sharing Server, and Time Machine Server—have been bundled with every installation of macOS High Sierra since its release in fall 2017, so that even more customers have access to these essential services at no extra cost. >

3d-game.com #dtdns.com
4irc.com #dtdns.com
b0ne.com #dtdns.com
bbsindex.com #dtdns.com
chatnook.com #dtdns.com
darktech.org #dtdns.com
deaftone.com #dtdns.com
dtdns.net #dtdns.com
effers.com #dtdns.com
etowns.net #dtdns.com
@classicvalues
classicvalues / latency.txt
Created October 4, 2021 18:50 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
function translateError(msg) {
var newErr = new Error(msg); // placed here to get correct stack
return e => {
newErr.originalError = e;
throw newErr;
}
}
async function asyncTask() {
const user = await UserModel.findById(1).catch(translateError('No user found'))
@classicvalues
classicvalues / CorsFilter.kt
Created October 4, 2021 18:49 — forked from christoph-daehne/CorsFilter.kt
Set CORS Headers in Spring Boot Kotlin project with WebFlux and Reactor
import org.springframework.http.HttpMethod
import org.springframework.http.HttpStatus
import org.springframework.stereotype.Component
import org.springframework.web.server.ServerWebExchange
import org.springframework.web.server.WebFilter
import org.springframework.web.server.WebFilterChain
import reactor.core.publisher.Mono
@Component
class CorsFilter : WebFilter {