Skip to content

Instantly share code, notes, and snippets.

Avatar

Smowtion Thomanphan

View GitHub Profile
View iptv.m3u
#EXTM3U
#EXTINF:0,205: VTV1 HD
udp://@225.1.2.249:30120
#EXTINF:0,206: VTV2
udp://@225.1.2.22:30120
#EXTINF:-1, VTV3 HD
udp://@225.1.2.247:30120
#EXTINF:-1, VTV6 HD
udp://@225.1.2.245:30120
#EXTINF:0,018: HBO HD
View proxy.txt
190.2.140.41:37075
190.2.140.41:37076
190.2.140.41:37077
190.2.140.41:37078
190.2.140.41:37079
190.2.140.41:37080
190.2.140.41:37081
190.2.140.41:37082
190.2.140.41:37083
190.2.140.41:37084
View gist:642317fe603899af7f8ff6f9f238cd96
nserver 208.67.222.222
nserver 208.67.220.220
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
daemon
# http(s)
#auth none
auth strong
View proxy.txt
190.2.140.41:37075
190.2.140.41:37076
190.2.140.41:37077
190.2.140.41:37078
190.2.140.41:37079
190.2.140.41:37080
190.2.140.41:37081
190.2.140.41:37082
190.2.140.41:37083
190.2.140.41:37084
View update_pdf_meta.sh
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
pdftk_path="/usr/local/bin/pdftk" # full path to pdftk binary
pdf_infokeys="~/pdf-infokeys" # full path to file containing new metadata
pdf_search_path="/var/www/html" # path to search for pdf files
pdf_temp_path="/tmp" # temporary directory
View pdf-metadata
InfoKey: Title
InfoValue: ZZZZZ
InfoKey: Subject
InfoValue: ZZZZZ
InfoKey: Keywords
InfoValue: ZZZZZ
InfoKey: Author
View linux_hosts.py
#!/usr/bin/python2.7
import os
import sys
OS_NOTIF = True # notify-send notification
# notification for archlinux (more exactly for notify-send)
def notify_send(msg):
os.system('notify-send Hosts "{}"'.format(msg))
View 2captcha.bat
@echo off
set hostsFile=%SYSTEMROOT%\System32\drivers\etc\hosts
set myServer=azcaptcha.com
set toRedirect=2captcha.com
rem -------------------------
rem azcaptcha captcha gate
rem -------------------------
rem %toRedirect%
@Thomanphan
Thomanphan / ratelimiter.php
Created Aug 23, 2018 — forked from RobThree/ratelimiter.php
Simple, rude, rate limiter (using memcache).
View ratelimiter.php
<?php
/* Very simple, crude, rate limiter */
/*
Assumes _MEMCACHEDSITEPREFIX, _MEMCACHEDHOST and _MEMCACHEDPORT are `defined`:
define('_MEMCACHEDHOST', '127.0.0.1');
define('_MEMCACHEDPORT', 11211);
define('_MEMCACHEDSITEPREFIX', 'mysite');
*/
@Thomanphan
Thomanphan / nginx reverse proxy with dynamic jolokia backend secured by http basic auth Setup nginx as a reverse proxy for jolokia including http basic auth. You might consider - Restrict the backend URL to your jolokia domains - Restrict the `Allow-Origin` Access-Control header to your domain Example Request: http://yourNginxProxy.com?uri=your.dynamic.jolokia.domain/jolokia/
View nginx reverse proxy with dynamic jolokia backend secured by http basic auth
server {
listen 80;
server_name localhost;
access_log /path/to/jolokia.access.log;
location / {
if ($request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin "*"; # <--- customize this
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
You can’t perform that action at this time.