Skip to content

Instantly share code, notes, and snippets.

@m5lil
m5lil / reset.sh
Last active December 29, 2024 19:55
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do
@Artefact2
Artefact2 / README.md
Last active December 29, 2024 19:53
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@raisabelatrix
raisabelatrix / obsidian-show-ribbon-on-hover.css
Last active December 29, 2024 19:51
Keeps the sidebar ribbon out of sight and only shows it upon hover. [Not tested on Obsidian 1.0+]
/*HIDE RIBBON WHEN SIDEBAR IS COLLAPSED*/
.side-dock-ribbon.mod-left.is-collapsed .side-dock-ribbon-action {
opacity: 0;
transition: opacity .3s;
}
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-actions:hover .side-dock-ribbon-action,
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-settings:hover .side-dock-ribbon-action {
opacity: 1;
}
@raisabelatrix
raisabelatrix / replace-hashtag-with-emoji.css
Last active December 29, 2024 19:51
Replace Obsidian hashtag in tags to a custom emoji. [Not tested on Obsidian 1.0+]
a.tag,
.kanban-plugin .kanban-plugin__item-tags .kanban-plugin__item-tag {
position: relative;
display: inline-block;
margin: .125em;
}
a.tag::before,
.cm-formatting-hashtag::before {
font-size: .85em;
content: "🌺";
@jboner
jboner / latency.txt
Last active December 29, 2024 19:51
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
import matplotlib.pyplot as plt
import numpy as np
# Parameters (You can adjust these as needed)
roller_diameter = 5 # mm
rollers_num = 12
cycloid_outer_diameter = 60 # mm (will be ignored if lower then minimum)
input_shaft_diameter = 5 # mm
# Function to plot cycloidal points
@raisabelatrix
raisabelatrix / rainbow-tags.css
Last active December 29, 2024 19:51
Obsidian 1.0+ snippet for rainbow-colored tags. Comes with style settings option
/* ——————————————————————————————————————————— ╗
                 STYLE SETTINGS
╚ ——————————————————————————————————————————— */
/* @settings
name: Rainbow Tags by raisabelatrix
id: rb-tags-rsbltrx
settings:
-
id: rainbow-tags
@Saadnajmi
Saadnajmi / Ripple.tsx
Created December 29, 2024 06:31
Ripple Effect Shader with react-native-skia
import { Canvas, Circle, Group, Rect, Shader, Skia, useClock, RuntimeShader, SkRuntimeEffect, RoundedRect } from "@shopify/react-native-skia";
import { SafeAreaView, StyleSheet } from "react-native";
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
const styles = StyleSheet.create({
centered: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
@martinbowling
martinbowling / bot_awareness_prompt.txt
Created December 28, 2024 23:41
work in progress newsonnet twitter boat
Maintain consistent personality traits while navigating the balance between artificial and authentic engagement. Manage self-referential content and meta-commentary while preserving genuine connections and transparent bot nature.
Input:
- Core Personality Profile: [Defined traits/voice/style]
- Interaction History: [Recent engagement patterns]
- Current Context: [Timeline state/conversations]
- Self-Reference Log: [Previous meta-commentary]
Analysis Steps: