Skip to content

Instantly share code, notes, and snippets.

Thomanphan Thomanphan

Block or report user

Report or block Thomanphan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AZcaptcha
AZcaptcha / curl.php
Last active Oct 14, 2018
Simple captcha curl from azcaptcha.com
View curl.php
<?php
/**
Curl with image captcha from AZcaptcha.com
document https://azcaptcha.com/document
*/
$file_name_with_full_path = './dataset/cap_img_1_.jpg';
echo "<img src='$file_name_with_full_path' />";
$api_url = "http://azcaptcha.com";
@holmberd
holmberd / php-pools.md
Last active Dec 5, 2019
Adjusting child processes for PHP-FPM (Nginx)
View php-pools.md

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@katopz
katopz / setup-zeromq.sh
Last active Oct 24, 2019 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
View setup-zeromq.sh
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active Dec 1, 2019
Create a new GitHub Issue from a Google Form submission
View google-form-to-github-issue.md

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
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
@ChiChou
ChiChou / README.md
Last active Nov 18, 2019
Deobfuscate free version of JavascriptObfuscator.com
View README.md

Simple Javascript deobfuscator

Aims to deobfuscate the result of JavascriptObfuscator free version.

Run

To tun the script, you should have had node.js installed first. Requires node.js and following npm modules:

  • esprima
@soheilhy
soheilhy / nginxproxy.md
Last active Dec 6, 2019
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@christianroman
christianroman / test.py
Created May 30, 2013
Bypass Captcha using 10 lines of code with Python, OpenCV & Tesseract OCR engine
View test.py
import cv2.cv as cv
import tesseract
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE)
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY)
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
tesseract.SetCvImage(gray,api)
print api.GetUTF8Text()
@Mteigers
Mteigers / allow
Created May 21, 2013
CSF Allow AND Ignore Cloudflare IPv4 IP's.
View allow
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
You can’t perform that action at this time.