Skip to content

Instantly share code, notes, and snippets.

@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active May 21, 2024 06:57
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

// From https://github.com/WebBluetoothCG/demos/blob/gh-pages/bluetooth-printer/index.html
var SERVICE = '000018f0-0000-1000-8000-00805f9b34fb';
var WRITE = '00002af1-0000-1000-8000-00805f9b34fb';
var DATA = ''
+ '\x1B' + '\x61' + '\x31' // center align
+ '\x1D' + '\x21' + '\x11' + 'Hello\nBluetooth!\n\n' // double font size
+ '\x1D' + '\x21' + '\x00' + '... from your friends\nat https://qz.io' // normal font size
+ '\n\n\n\n\n\n\n'; // feed paper
@nafiesl
nafiesl / how_to_get_telegram_chat_id.md
Created December 20, 2023 11:49
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@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: (