Skip to content

Instantly share code, notes, and snippets.

View mugli's full-sized avatar
🤷

Mehdi Hasan Khan mugli

🤷
View GitHub Profile
@EwoutH
EwoutH / Snapdragon_7_8_series_2024.md
Last active March 26, 2024 15:49
Qualcomm Snapdragon 7 and 8 series spec comparison (2024)

| SoC | Snapdragon 8 Gen 3
(SM8650) | Snapdragon 8s Gen 3
(SM8635) | Snapdragon 8 Gen 2
(SM8550) | Snapdragon 7+ Gen 3
(SM7675-AB) | Snapdragon 7+ Gen 2
(SM7475-AB) | Snapdragon 7 Gen 3
(SM7550-AB) | |----------------------|:---------------------------------------

@khalidx
khalidx / node-typescript-esm.md
Last active May 8, 2024 07:58
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@MatthewJamesBoyle
MatthewJamesBoyle / DOCKERFILE
Last active March 11, 2024 15:57
production go dockerfile
FROM golang:1.21.0-bullseye as builder
COPY . /workdir
WORKDIR /workdir
ENV CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all"
ENV GOFLAGS="-buildmode=pie"
RUN go build -ldflags "-s -w" -trimpath ./cmd/app
@lainosantos
lainosantos / dell_u2723qe.sh
Last active May 10, 2024 09:03
Basic commands for for KVM, PIP and PBP features for Dell Monitor U2723QE on Linux ddcutil
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ] && groups | grep -qwv 'i2c' && getent group i2c &> /dev/null
then
echo "Insuficient permissions, run as root ou join $USER to i2c group."
exit 1
fi
case "$1" in
@nolanlawson
nolanlawson / scaling_mastodon_down.md
Last active May 4, 2024 01:48
Scaling Mastodon down

Scaling Mastodon down

There is already a guide on scaling your Mastodon server up. This is a short guide on scaling your Mastodon server down.

I.e., maybe you want to run a small instance of <100 active users, and you want to keep your cloud costs reasonable. So you might be running everything on a single machine, with limited memory and CPU. (In my case, I was using a t3.medium instance with 2 vCPUs and 4GB of RAM.) How do you do this?

Note that I'm not a Ruby or Sidekiq expert, and most of this stuff I figured out through trial and error.

@jasnell
jasnell / index.js
Created May 24, 2021 21:58
Getting loopy with JavaScript
'use strict';
const {
createHistogram,
performance: {
timerify
}
} = require('perf_hooks');
const users = [
#!/bin/bash
Counter=20
DisplayHeader="Date Time GPU-C GPU-F CPU-C CPU-F CPU Core Vcore"
while true ; do
let ++Counter
if [ ${Counter} -eq 21 ]; then
echo -e "${DisplayHeader}"
Counter=0
fi
@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active March 26, 2024 07:04
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:
@cedrickchee
cedrickchee / rust_resources.md
Last active May 3, 2024 09:46
Awesome Rust — a collection of resources for learning Rust

Awesome Rust

I learn Rust by reading The Rust Programming Language (aka. TRPL) book.

This is my mind map and collection of resources for learning Rust in early 2019.

I plan to continuously update this list if time allows in future. I will move this into its own GitHub repo or something more permanent when this grow.