Skip to content

Instantly share code, notes, and snippets.

View sunjc826's full-sized avatar
💭

Sun Jia Cheng sunjc826

💭
View GitHub Profile
@vexx32
vexx32 / start-noita.ps1
Last active July 16, 2024 01:08
Starts Noita from the given path, optionally with a specific seed set.
function Start-Noita {
<#
.SYNOPSIS
Starts Noita from a PowerShell prompt, optionally with a specific set seed for a new game.
.DESCRIPTION
To use this function, copy and paste the complete function definition into a PowerShell
session, and then invoke it with `Start-Noita`. Supply `-Seed somevalue` if you would like
to run a specific seed (see the examples below).
@sajithneyo
sajithneyo / bracket-pair-colorizer-2-settings
Created June 25, 2019 14:23
Settings you need for bracket pair colorizer 2
{
"bracket-pair-colorizer-2.colors": [
"Gold",
"Orchid",
"LightSkyBlue",
"Salmon",
"LawnGreen",
"DarkOrange",
"Cornsilk"
],
@fnky
fnky / ANSI.md
Last active July 17, 2024 18:30
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@tralston
tralston / reload-config-postgresql.md
Created August 21, 2017 08:18
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active June 9, 2024 23:19
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version