Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 02:14
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
@mmartinjoo
mmartinjoo / devops-with-laravel-toc.md
Last active April 28, 2024 02:14
DevOps with Laravel Table of Contents

Topics coming in the next edition:

  • ✅ Load balancers from scratch (published on 10th of October)
  • ✅ Terraform (published on 12th of November)
  • HELM

Fundamentals - 208 pages (Basic package)

Building a pipeline

nginx

  • Serving static content
  • CGI, FastCGI, php-fpm
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 28, 2024 02:13
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {

Install MSYS2 with Git for Windows and build tools

  1. Install MSYS2.
  2. After installation in opened terminal add Git for Windows repos to /etc/pacman.conf:
    cat << EOF >> /etc/pacman.conf
    
    [git-for-windows]
    Server = https://wingit.blob.core.windows.net/x86-64
@MortezaRamezani
MortezaRamezani / truenas-custom-install.md
Created May 6, 2023 23:49
Installing TrueNAS Scale with custom boot-pool partitioning

Summary

Mostly adapted from here: https://www.reddit.com/r/truenas/comments/lgf75w/scalehowto_split_ssd_during_installation/

I am using a 500GB nvme as a boot+app drive, and don't want any mirroring for it. Most steps are similar execpt where creating the zfs pool Here I need to get the partition uuid from ll /dev/disk/by-partuuid/ and use the symlink to execute next step which again wasn't a mirror config:

zpool create -f name-something /dev/disk/by-partuuid/<from last step>
zpool export name-something
@katemonkeys
katemonkeys / gist:e17580777b57915f5068
Last active April 28, 2024 02:09
Everything Wrong With The Withings API

Top Six Things You Need To Know About The Withings API*

*where “you” is probably a developer, or at least a strange user

I should preface this by saying that I got a Withings Smart Body Analyzer for Christmas last year and I’ve been generally happy with it. It purports to be able to take my heart rate through my bare feet and that seems not to work for my physiology, but overall I’m a fan. If if their Wikipedia page is to be believed they are having a pretty rad impact on making the Quantified Self movement more for normal people and they only have 20 full time employees. Also they try hard to use SI units, which I can get behind. Anyway, on to the rant.

I originally called this post “Everything wrong with the Withings API” and I meant it. For every useful field I can extract from their “award winning” app, I have spent an hour screaming at the inconsistencies in their implementation or inexplicable holes in their data

@jlimadev
jlimadev / ts-boilerplate.md
Created April 28, 2024 02:07 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting

Всем привет. Хочу поделиться полученными знаниями. Сразу спасибо Илье Кирову за наводку. Далее - за основу брал этот топик - Adapter debuggen mit VSCode.

Итак - идея - в wsl поставить линукс, в него иоброкер, но среду разработки и отладки использовать родную виндовую - vscode.

Теперь опишу по порядку:

  • Ставим wsl на Windows 10. Важно - ставим wsl 2, ибо рекомендуется vscode, да и некоторые фичи, как я понимаю именно версии 2 - необходимы.
@jamieweavis
jamieweavis / macos-app-icon.md
Last active April 28, 2024 02:04
How to create an .icns macOS app icon
/*
robin verton, dec 2015
implementation of the RC4 algo
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 256 // 2^8