Skip to content

Instantly share code, notes, and snippets.

View syuraj's full-sized avatar
🏠
Working from home

Suraj Shrestha syuraj

🏠
Working from home
View GitHub Profile
@syuraj
syuraj / gist:6fc2a0c1433036553fa3326fe6249321
Last active May 17, 2025 16:51
adguard-stream-allowlist
@@||netflix.com^
@@||nflxvideo.net^
@@||nflximg.net^
@@||nflxso.net^
@@||nflxext.com^
@@||hulu.com^
@@||huluim.com^
@@||hulustream.com^
@syuraj
syuraj / setup-l2tp-vpn.sh
Created May 12, 2025 03:58
setup ipsec vpn using strongswan
#!/bin/bash
# Enable IP forwarding
echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# Install required packages
sudo apt update
sudo apt install -y strongswan xl2tpd ppp ufw iptables-persistent
@syuraj
syuraj / gist:8ea91a9826005f5d15c11292de23842b
Created March 3, 2025 17:39
Default AWS Config rules
resource "aws_config_config_rule" "account_part_of_organizations" {
name = "account-part-of-organizations"
description = "Rule checks whether AWS account is part of AWS Organizations. The rule is NON_COMPLIANT if the AWS account is not part of AWS Organizations or AWS Organizations master account ID does not match rule parameter MasterAccountId."
source {
owner = "AWS"
source_identifier = "ACCOUNT_PART_OF_ORGANIZATIONS"
}
@syuraj
syuraj / unsubscribe-all.js
Last active February 2, 2025 16:36
Youtube Unsubscribe All Script
// go to this link https://www.youtube.com/feed/channels
// run code below in browser console
(async () => {
const delay = (ms) => new Promise(res => setTimeout(res, ms));
let buttons = document.querySelectorAll('ytd-subscribe-button-renderer yt-button-shape button');
for (let button of buttons) {
if (button.innerText.trim().toLowerCase() === "subscribed") {
@syuraj
syuraj / remove_github_stars.sh
Created December 16, 2023 02:59
remove_github_stars.sh
#!/usr/bin/env bash
# source: https://gist.github.com/justlaputa/a6da84981eca963817e652b5f2452cfc
set -o errexit
set -o pipefail
set -o nounset
STARS_PAGE_COUNT=20
STARS_FILE=stars.txt
DELETE_SLEEP_TIME=.5
@syuraj
syuraj / HTF-Candle.pine
Last active October 23, 2023 03:12
HTF Candle R1.2 by JustUncleL
//@version=5
indicator("HTF Candle R1.2 by JustUncleL", shorttitle="HTF Candle", overlay=true)
//
// Author: JustUncleL
// Date: 9-Nov-2017
// Version: R1.2
//
// Description:
@syuraj
syuraj / Backtrader_SuperTrend.py
Created September 20, 2023 02:46
Backtrader SuperTrend Indicator
class SuperTrend(bt.Indicator):
lines = ('super_trend',)
params = (
('multiplier', 12.0),
('atr_period', 3),
)
def __init__(self):
self.isDownTrend = -1
self.isUpTrend = 1
@syuraj
syuraj / Install-Spinnaker-Locally.md
Last active March 5, 2022 20:04
Install Spinnaker Locally (quick steps)

Notes: Install halyard, kubernetes (eg. docker-desktop from docker). Also need an aws account for storage (unless using minio)

  • Enable Kubernetes:
    • hal config provider kubernetes enable
  • Add account:
    • hal config provider kubernetes account add local-spinnaker --context docker-desktop
    • docker-desktop is local docker context
  • Enable artifacts:
    • hal config features edit --artifacts true
  • Set storage:
@syuraj
syuraj / Local-Spinnaker-using-Helm.md
Created March 5, 2022 19:36
Install Local Spinnaker using helm chart
To prevent wall messages from messing up all of your open terminals:
sudo systemctl stop systemd-ask-password-wall.service
sudo systemctl stop systemd-ask-password-wall.path
To make this change persistent over boot:
sudo systemctl mask systemd-ask-password-wall.service
sudo systemctl mask systemd-ask-password-wall.path