a.k.a. what to do when your ISP starts blocking sites :(
Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" localhost 8080
To clear the domain and port
| # https://github.com/sass/node-sass/issues/2165 | |
| docker pull node | |
| # cd to working dir | |
| # start docker | |
| docker run -it -v $PWD:/code -p 3001:3000 node bash | |
| npm i -g n | |
| n 8.10.0 |
| let calculateEachMonth = () => { | |
| const data = {}; | |
| const dataYear = {}; | |
| document.querySelectorAll('#list > div > table > tbody > tr').forEach(row => { | |
| const dateCell = row.querySelector('td:nth-child(1)').innerHTML; | |
| const money = Number(row.querySelector('td:nth-child(2)').innerHTML.replace(/[^0-9\.]/g, '')); | |
| const yearMonth = 'T' + dateCell.replace(/月.*/g, '').replace(/ /, ''); | |
| const year = 'T' + dateCell.replace(/ \d*月.*/g, ''); | |
| if (data[yearMonth]) { | |
| data[yearMonth] += money; |
| { | |
| "inbounds": [ | |
| { | |
| "port": 1080, // Listening port | |
| "protocol": "socks", // Incoming protocol is SOCKS 5 | |
| "sniffing": { | |
| "enabled": true, | |
| "destOverride": ["http", "tls"] | |
| }, | |
| "settings": { |
| const curry = fn => { | |
| if (fn.length <= 1) return fn; | |
| const generator = (...args) => { | |
| if (fn.length === args.length) { | |
| return fn(...args); | |
| } else { | |
| return (...args2) => generator(...args, ...args2); | |
| } | |
| }; | |
| return generator; |
| import React from 'react'; | |
| export default class RequestTest extends React.PureComponent { | |
| constructor(props, context) { | |
| super(props); | |
| this.state = { | |
| pageSize: 500, | |
| concurrent: true, | |
| concurrentNumber: 5, |
| /** | |
| * Box triangle with shadow box | |
| */ | |
| .ant-dropdown-placement-bottomLeft ul { | |
| box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); | |
| position: relative; | |
| top: 20px; | |
| left: 20px; | |
| width: 100px | |
| } |
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |
| <?php | |
| $servername = '127.0.0.1'; | |
| $username = 'dbuser'; | |
| $password = 'dbpassword'; | |
| $dbname = 'dbname'; | |
| // Create connection | |
| $conn = new mysqli($servername, $username, $password); | |
| // Check connection |
| git ls-files -z | xargs -0 git update-index --assume-unchanged |