Skip to content

Instantly share code, notes, and snippets.

@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
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
disableSafeArea()
}
}
func disableSafeArea() {
@mschwaig
mschwaig / sway.nix
Last active April 28, 2024 01:51
Configure sway as the window manager for NixOS with gdm as the display manager
{ config, pkgs, lib, ... }:
{
# This sway config is mostly based on https://nixos.wiki/wiki/Sway
# which integrates sway with systemd in the style described here
# https://github.com/swaywm/sway/wiki/Systemd-integration
# and the replies in https://github.com/NixOS/nixpkgs/issues/57602
# with some individual packages added/removed and using sddm as the display manager.
#
# Take care to start the correct target as described by the sway proejct wiki.
@aarav2you
aarav2you / RemoveClutter.theme.css
Last active April 28, 2024 01:57
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;