Skip to content

Instantly share code, notes, and snippets.

@geordyjames
geordyjames / eslint_prettier_airbnb.md
Last active May 21, 2024 06:44
VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node
# Source: https://gist.github.com/vfarcic/8ebbf4943c5c012c8c98e1967fa7f33b
#####################################################################
# Say Goodbye to Containers - Ephemeral Environments with Nix Shell #
#####################################################################
# Additional Info:
# - Nix: https://nixos.org
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM
@rkttu
rkttu / hvswitch.cmd
Created February 14, 2018 05:38
Windows Hypervisor Switch Tool
@echo off
pushd "%~dp0"
cls
echo This script allows you to easily turn on or off Windows Hypervisor settings at once. This script is useful when you want to use Hyper-V or Docker for Windows with other hypervisors.
echo.
net session >nul 2>&1
if not %errorLevel% == 0 (
echo To run this script, you must run it as a user with administrative privileges.
@Esaqe
Esaqe / windows-keys.md
Created January 13, 2024 20:34 — forked from jad2k/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Where to buy windows 11 pro keys?

To get Windows Keys go to : https://www.sftkey.com

if you need a Windows 11 Pro key, this is the direct link to get it :

@robinsmidsrod
robinsmidsrod / ubuntu-autoinstall.ipxe
Last active May 21, 2024 06:36
Ubuntu 20.04 autoinstall (casper/subiquity/curtin) to iPXE - work-in-progress (not fully working for iSCSI)
:ubuntu-autoinstall
echo Starting Ubuntu ${ubuntu-version} ${archl} autoinstaller for ${initiator-iqn}
sanhook ${base-iscsi}:${hostname}.boot.ubuntu || sleep 1
#sanhook ${base-iscsi}:${hostname}.boot.ubuntu && set ubuntu-cc-iscsi storage: { layout: { name: lvm }, config: [{type: disk, path: ${base-iscsi}:${hostname}.boot.ubuntu }] } || sleep 1
#sanhook ${base-iscsi}:${hostname}.boot.ubuntu && set ubuntu-iscsi ISCSI_INITIATOR=${initiator-iqn} ISCSI_TARGET_NAME=${base-iqn}:${hostname}.boot.ubuntu ISCSI_TARGET_IP=${iscsi-server} ISCSI_TARGET_PORT=3260 || sleep 1
# https://medium.com/@tlhakhan/ubuntu-server-20-04-autoinstall-2e5f772b655a
# https://ubuntu.com/server/docs/install/autoinstall
# https://github.com/canonical/cloud-init/blob/master/doc/examples/kernel-cmdline.txt
# https://matt.olan.me/raspberry-pi-iscsi-root-on-ubuntu-20-04/
# https://askubuntu.com/questions/1235723/automated-20-04-server-installation-using-pxe-and-live-server-image
@matthewbeta
matthewbeta / scrim-gradient.scss
Last active May 21, 2024 06:35
A simple little SCSS mixin for creating scrim gradients
/*
A simple little SCSS mixin for creating scrim gradients
Inspired by Andreas Larson - https://github.com/larsenwork
https://css-tricks.com/easing-linear-gradients/
*/
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') {
$scrimCoordinates: (
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active May 21, 2024 06:35
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@yorickdowne
yorickdowne / README.md
Last active May 21, 2024 06:31
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

This adds a mirror to an existing Ubuntu ZFS boot drive after the fact. It's been tested on Ubuntu 20.04 by me and all the way up to Ubuntu 22.10 by users in comments.

ZFS requires native encryption to be added at pool / dataset creation. Ubuntu 22.04 supports this during installation. Whether these instructions are suitable for mirroring such a setup has not been tested. For Ubuntu 20.04, these instructions are not suitable for creating an encrypted ZFS boot disk, please use the full instructions linked above for that. You can, however, add an en

@ilebedie
ilebedie / python_like_print.hpp
Created July 14, 2015 10:28
Python-like print in c++
#include <iostream>
using namespace std;
void print(){cout<<'\n';}
template<typename T, typename ...TAIL>
void print(const T &t, TAIL... tail)
{
cout<<t<<' ';
@mmozeiko
mmozeiko / !README.md
Last active May 21, 2024 06:27
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).