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";
@cantgis
cantgis / LICENCE SUBLIME TEXT
Created May 28, 2018
Sublime Text 3 Serial key build is 3176
View LICENCE SUBLIME TEXT
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@holmberd
holmberd / php-pools.md
Last active Oct 11, 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 Sep 28, 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 Sep 6, 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
@soheilhy
soheilhy / nginxproxy.md
Last active Oct 14, 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
@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
@lazarofl
lazarofl / a_mongodb_to_s3_backup.sh
Last active Aug 16, 2018
MongoDB Automatic Backup to Amazon S3 with Crontab and s3cmd. Red Hat Linux on Amazon EC2
View a_mongodb_to_s3_backup.sh
#!/bin/bash
#Force file syncronization and lock writes
mongo admin --eval "printjson(db.fsyncLock())"
MONGODUMP_PATH="/usr/bin/mongodump"
MONGO_HOST="prod.example.com"
MONGO_PORT="27017"
MONGO_DATABASE="dbname"
You can’t perform that action at this time.