Skip to content

Instantly share code, notes, and snippets.

View vijayanandnandam's full-sized avatar

vijayanandnandam

  • cybrilla
  • bangalore
View GitHub Profile
@vijayanandnandam
vijayanandnandam / README.md
Last active February 4, 2020 07:32
Bittorrent Websocket / WebRtc tracker

Install deps

run npm i

Run tracker

node index.js # starts the tracker on port 8000
@vijayanandnandam
vijayanandnandam / erb_to_haml.sh
Created April 20, 2019 15:34
Convert Recursiverly ERB to haml
# install html2 haml gem then run in the directory to convert erb haml files
# You have to delete erb files your self after checking if everything is ok..
for file in $(find . -type f -name \*.html.erb); do
html2haml -e ${file} "$(dirname ${file})/$(basename ${file} .erb).haml";
done
Do all in https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
iptables -I FORWARD -i tun0 -o eth0 \
-s 10.8.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -I FORWARD -m conntrack --ctstate RELATED,ESTABLISHED \
-j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 \
-s 10.8.0.0/24 -j MASQUERADE
@vijayanandnandam
vijayanandnandam / extratorrent.cc.conf
Last active August 29, 2015 14:09
extratorrent.cc.conf
server {
listen 80;
server_name extratorrent.cc;
location / {
proxy_bind $server_addr;
proxy_pass http://extratorrent.cc;
}
}
server {
server {
listen 80;
server_name torrentz.eu;
location / {
proxy_bind $server_addr;
proxy_pass http://torrentz.eu;
}
}
server {
#!/bin/bash
#
# watchdog
#
# Run as a cron job to keep an eye on what_to_monitor which should always
# be running. Restart what_to_monitor and send notification as needed.
#
# This needs to be run as root or a user that can start system services.
#
# Revisions: 0.1 (20100506), 0.2 (20100507)
@vijayanandnandam
vijayanandnandam / nginx.sh
Last active August 29, 2015 14:02
Nginx Init Script
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid