Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / node-spawn-process.md
Created May 7, 2021 03:07
nodejs-spawn-process
const { promisify } = require('util');
const exec = promisify(require('child_process').spawn)
const execShPromise = require("exec-sh").promise;

const getActor = async () => {

  const pr_actor = await exec('echo $actor', {
 // cwd: process.cwd(),
@zoonderkins
zoonderkins / npm-audit.md
Last active May 7, 2021 03:08 — forked from KittyGiraudel/npm-audit.js
npm-audit
const { exec } = require('child_process')
const { promisify } = require('util')
const chalk = require('chalk')

// See: https://docs.npmjs.com/about-audit-reports#severity
const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical']
const SEVERITY_THRESHOLD = 'critical'
const run = promisify(exec)
@zoonderkins
zoonderkins / npm-audit_report-generation.sh
Created May 5, 2021 03:12 — forked from aravindkumarsvg/npm-audit_report-generation.sh
Generates npm audit report for multiple directories and searching for multiple package.json inside those given directories
#!/bin/bash
# Global variable declarations
format="json"
directories=()
current_directory=`pwd`
report_directory="${current_directory}/report/"
fresh_report_directory="0"
# usage
@zoonderkins
zoonderkins / raspi-setup-gitea.md
Created May 3, 2021 09:27 — forked from afragen/raspi-setup-gitea.md
Installing Gitea on Raspberry Pi 3 b+ with nginx and automatic backups

Setup Gitea on Raspberry Pi (3b+)

These instructions are based on this article: https://docs.gitea.io/en-us/install-from-source/.

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

Use Noobs to install Raspian.

Open menu Preferences > Raspberry Pi Settings

@zoonderkins
zoonderkins / fresh-debian-vps-recommend.md
Last active October 5, 2021 10:31
Fresh Debian VPS recommend

sources.list

deb http://cdn-aws.deb.debian.org/debian unstable main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free

Check your linux release

uname -mrs

@zoonderkins
zoonderkins / force-apt-use-ipv4.md
Last active June 5, 2022 14:07
Force apt use IPv4

Forcing APT use IPV4

Force IPv4 and stable branch

nano /etc/apt/apt.conf.d/99defaultrelease

Paste and save

APT::Default-Release "stable";
Acquire::ForceIPv4 "true";
@zoonderkins
zoonderkins / semantic-release-version-batch-remove-v-prefix.md
Last active April 19, 2021 10:33
semantic-release version batch remove "v" prefix

Example

This example will show how to remove "v" prefix in batch mode. v2.4.0 --> 2.4.0



## Fetch all tags
git fetch --tags
BEGIN MESSAGE.
9ezRyUqBheL8D0I UkRzxTVUvkNo4yt UyS6JRqCDfPGCWJ mczeYF8gdlZNYKC
KNbQPKkALMAsxkK YrYhPLghGxNTCKq 6Xr2MZHgg6jieEk 0V6XGeuqSqLrail
WrJl3sBD0OW1mWI d2vX48EKAPzRUGc ZQMsXBZdSu5UTvk tjZe7rsR5HbpSOM
GypcZveU4oRVtk8 1N0VO1LL4s9I8qx aWn3B0aLMzWSiL.
END MESSAGE.
@zoonderkins
zoonderkins / aria2
Created April 6, 2021 09:44
command line download of torrent magnet link using aria2
# Command to download file via bittorrent magnet link using aria2.
# See website and documentation at https://aria2.github.io
# -d specifies the directory to store the downloaded file
# --seed-time=0 disables seeding after download has completed
aria2c -d ~/Downloads --seed-time=0 "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C"
@zoonderkins
zoonderkins / ubuntu-disable-systemd-DNS-resolve
Created March 19, 2021 09:20
Ubuntu 20 disable 127.0.0.53 DNS resolve
##
If you got `127.0.0.53` in your `/etc/resolv.conf` pls consider to disable `systemd-resolved`
```
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
```