Skip to content

Instantly share code, notes, and snippets.

View thanhpcc96's full-sized avatar
🧣

Thanh Pham thanhpcc96

🧣
  • Viet Nam
View GitHub Profile

Note

For unbutu 18.04 Server

Install squid & update

sudo apt-get update
sudo apt-get install dante-server

Check internet interface

@thanhpcc96
thanhpcc96 / squid_proxy_tutorial.md
Created August 11, 2020 02:59 — forked from Infinitay/squid_proxy_tutorial.md
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils
<!--Tracking number input box.--><center><input type="text" id="YQNum" maxlength="50" placeholder="Tracking Number" /> <!--The button is used to call script method.--> <input type="button" value="TRACK" onclick="doTrack()" /> <!--Container to display the tracking result.-->
<div id="YQContainer"></div>
</center><!--Script code can be put in the bottom of the page, wait until the page is loaded then execute.-->
<script type="text/javascript" src="//www.17track.net/externalcall.js"></script>
<script type="text/javascript">// <![CDATA[
function doTrack() {
var num = document.getElementById("YQNum").value;
if(num===""){
alert("Enter your number.");
return;
<!--Tracking number input box.--><center><input type="text" id="YQNum" maxlength="50" placeholder="Tracking Number" /> <!--The button is used to call script method.--> <input type="button" value="TRACK" onclick="doTrack()" /> <!--Container to display the tracking result.-->
<div id="YQContainer"></div>
</center><!--Script code can be put in the bottom of the page, wait until the page is loaded then execute.-->
<script type="text/javascript" src="//www.17track.net/externalcall.js"></script>
<script type="text/javascript">// <![CDATA[
function doTrack() {
var num = document.getElementById("YQNum").value;
if(num===""){
alert("Enter your number.");
return;
@thanhpcc96
thanhpcc96 / MySQL_5-7_macOS.md
Created November 21, 2019 04:07 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@thanhpcc96
thanhpcc96 / readme.md
Created July 20, 2019 03:24
Setup SSL for EC2 unbutu(https,....)

Installation

  1. install nginx
sudo apt-get install nginx
  1. Next, let’s setup Let’s Encrypt using Certbot.
sudo add-apt-repository ppa:certbot/certbot
  1. Update package
@thanhpcc96
thanhpcc96 / Set up MongoRemote.md
Last active June 12, 2019 10:22
Remote MongoDB

1. Set up your user

  • access to mongo
mongo
  • create database
user database_name
  • create user

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@thanhpcc96
thanhpcc96 / VSCode setup for React-ReactNative-Nodej
Created December 5, 2018 03:13
Support clean code,.... >es6, nodejs,.......
Top VS code extensions:
1. Bracket Pair Colorizer
2. Color Highlight
3. ESLint
-- first: npm i -g eslint
-- second: install eslint extensions in VScode
4. Flow Language Support
5. GitLens — Git supercharged
6. indent-rainbow
7. Prettier - Code formatter
@thanhpcc96
thanhpcc96 / resetAllSimulators.sh
Created November 16, 2018 07:33 — forked from ZevEisenberg/resetAllSimulators.sh
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all