Skip to content

Instantly share code, notes, and snippets.

@edwingustafson
edwingustafson / construction.css
Created March 5, 2019 13:04
Construction tape border in pure CSS
body {
border-top: solid 10px;
border-image: repeating-linear-gradient( -75deg, yellow, yellow 10px, black 10px, black 20px) 20;
}
@Lonsdale201
Lonsdale201 / code
Created May 9, 2024 08:24
JetEngine - Calculated callback - Calculate Hours and Minutes
// This code can convert the number values to Hours, and minutes.
// Example, your meta store: "125" this calc can output to: 2h5m so 2 hours, and 5 minutes
// copy this code in the child theme functions.php or a specific code plugin like FluentSnippets
// For the code to work, you need to install the Calculated Callback Add-on addons
// Plugin: https://github.com/MjHead/jet-engine-calculated-callback
// Plugin desc: https://crocoblock.com/knowledge-base/jetengine/calculated-callback-add-on/#custom-callback
// when you pasted the code, open the Elementor editor, and place the Dynamic Field widget, enable the Filter Field output
// in the dropdown, select the Calculated field Callback
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 9, 2024 08:41
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 08:39
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@unitycoder
unitycoder / MatrixPlayGround.shader
Last active May 9, 2024 08:39
Matrix Playground Shader
// Matrix PlayGround Shader - UnityCoder.com
// References:
// Matrices http://www.codinglabs.net/article_world_view_projection_matrix.aspx
// Rotation: http://www.gamedev.net/topic/610115-solved-rotation-deforming-mesh-opengl-es-20/#entry4859756
Shader "UnityCoder/MatrixPlayground"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
@steveherrin
steveherrin / main_aiocache.py
Created January 11, 2024 19:38
Minimal demo of using aiocache with FastAPI
"""
caching test/demo
first:
pip install fastapi aiocache "uvicorn[standard]"
"""
import asyncio
import contextlib
import json
import logging
@asus4
asus4 / DownloadManager.cs
Created April 25, 2012 14:32
Unity DownloadManager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/**
DownloadManager
@author koki ibukuro
*/
public class DownloadManager : MonoBehaviour , System.IDisposable {
// using classes
@yorickdowne
yorickdowne / HallOfBlame.md
Last active May 9, 2024 08:32
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.

This document aims to snapshot some known good and known bad models.

For size, 4TB comes recommended as of mid 2024. The smaller 2TB drive should last an Ethereum full node until early 2025 or thereabouts, with crystal ball uncertainty. Remy wrote a migration guide to 4TB.

High-level, QLC and DRAMless are far slower than "mainstream" SSDs. QLC has lower endurance as well. Any savings will be gone when the drive fails early and needs to be replaced.

@mathebox
mathebox / color_conversion.py
Created April 12, 2015 16:47
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high