Skip to content

Instantly share code, notes, and snippets.

@jjb
jjb / file.md
Last active May 8, 2024 19:22
Using Jemalloc 5 with Ruby.md

For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.

Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.

Ubuntu/Debian

FROM ruby:3.1.2-bullseye
RUN apt-get update ; \
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 19:19
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
@vinicius-stutz
vinicius-stutz / README.md
Last active May 8, 2024 19:19
Máscara p/ telefones com 8 ou 9 dígitos (jquery.mask.js)
@TengdaHan
TengdaHan / ddp_notes.md
Last active May 8, 2024 19:15
Multi-node-training on slurm with PyTorch

Multi-node-training on slurm with PyTorch

What's this?

  • A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
  • Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
  • Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
  • Warning: might need to re-factor your own code.
  • Warning: might be secretly condemned by your colleagues because using too many GPUs.
@aaronhuang1005
aaronhuang1005 / Experiment1.r
Last active May 8, 2024 19:15
生醫訊號處理的實作 exp1 R script
# Created on Wed May 8 14:12:20 2024
# @author: Aaron Huang
#---------------------------------------------------------------------------------
# install signal library
install.packages("signal")
library("signal")
convolution <- function(x,h){
@tonY1883
tonY1883 / ValidateYoutubeVideoId.js
Created September 14, 2017 02:18
A small trick to check if youtube video exist with its id.
function validVideoId(id) {
var img = new Image();
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg";
img.onload = function () {
checkThumbnail(this.width);
}
}
function checkThumbnail(width) {
//HACK a mq thumbnail has width of 320.
#!/bin/bash
VERSION="1.1.8"
info() {
echo -e "\033[32m[Info]\033[0m $1"
}
error() {
echo -e "\033[31m[Error]\033[0m $1"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidteren
davidteren / nerd_fonts.md
Last active May 8, 2024 19:07
Install Nerd Fonts via Homebrew [updated & fixed]