Skip to content

Instantly share code, notes, and snippets.

@aarav2you
aarav2you / RemoveClutter.theme.css
Last active April 28, 2024 01:50
Modifications for the Discord client to remove the clutter
/*==========
RemoveClutter.theme.css by aarav2you
How to inject: Paste in "Custom CSS" tab in BetterDiscord or download and use as theme
========== */
/* Stickers same size as emojis */
.assetWrapper-3GNt0z {
max-width: 48px;
max-height: 48px;
@steve981cr
steve981cr / How-to-Release-an-Electron-App-on-the-Mac-App-Store.md
Last active April 28, 2024 01:49
Step by step instructions on how to release an Electron app on the Mac App Store. Uses Electron-builder to package the app.
@x-yuri
x-yuri / docker-compose-anonymous.yml
Last active April 28, 2024 01:46
docker: migrate volume data #pg #docker
version: '3'
services:
s1:
image: postgres:12
container_name: ${prefix}_compose_anonymous
ports:
- $pg_port:5432
@nicowilliams
nicowilliams / bisect-rebase.sh
Last active April 28, 2024 01:46
Bisection, but for git rebase, to quickly rebase across thousands of upstream commits
# Viktor Dukhovni's (@vdukhovni) slow rebase, made faster by bisecting, sort of
#
# fastrebase BRANCH_TO_REBASE ONTO
function fastrebase {
typeset b N
if (($# > 0)) && [[ $1 = -h || $1 = --help ]]; then
printf 'Usage: fastrebase BRANCH_TO_REBASE ONTO_HEAD\n'
printf ' fastrebase # to continue after resolving conflicts\n'
printf '\n\tfastrebase is a shell function that uses the following\n'
@jboner
jboner / latency.txt
Last active April 28, 2024 01:46
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
@hungtcs
hungtcs / tooltip-formatter.ts
Created July 22, 2019 10:00
echarts tooltip formatter function with unit supported
import { EChartOption } from 'echarts';
declare interface _Format extends EChartOption.Tooltip.Format {
marker: string;
axisValueLabel: string;
}
const formatter: EChartOption.Tooltip.Formatter = function(params: _Format|Array<_Format>, _ticket, _callback) {
if(params instanceof Array) {
if(params.length) {
@bradtraversy
bradtraversy / myscript.sh
Last active April 28, 2024 01:38
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 01:51
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
@wavezhang
wavezhang / java_download.sh
Last active April 28, 2024 01:29
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz