Skip to content

Instantly share code, notes, and snippets.

@needforspeed
needforspeed / _hsts.conf
Created May 14, 2022 15:35 — forked from R0GGER/_hsts.conf
Workaround - Security Headers @ NGINX Proxy Manager
{% if certificate and certificate_id > 0 -%}
{% if ssl_forced == 1 or ssl_forced == true %}
{% if hsts_enabled == 1 or hsts_enabled == true %}
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always;
add_header Referrer-Policy strict-origin-when-cross-origin;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests;
@needforspeed
needforspeed / irc.md
Created May 3, 2022 21:18 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@needforspeed
needforspeed / reinstall_VPS_from_inside.sh
Created February 10, 2022 02:08 — forked from 4abhinavjain/reinstall_VPS_from_inside.txt
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
@needforspeed
needforspeed / ip_check.md
Last active May 31, 2021 17:10
Asus re-get IP

Add script to crontab using cru command

#!/bin/sh
# Purpose: script to add the ip check script to cron
# Author: Allan Marcus under GPL version 2.x or above
# /jffs/scripts/services-start
# -------------------------------------------------------------
# cru command
# https://www.cyberciti.biz/faq/how-to-add-cron-job-on-asuswrt-merlin-wifi-router/
@needforspeed
needforspeed / get_latest_release.sh
Created December 3, 2020 02:07 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required