apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package poison | |
| import ( | |
| "database/sql" | |
| "reflect" | |
| "github.com/gorilla/schema" | |
| ) | |
| // Convertors for sql.Null* types so that they can be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package log | |
| import ( | |
| "fmt" | |
| "github.com/Sirupsen/logrus" | |
| "runtime" | |
| "strings" | |
| ) | |
| var logger = logrus.New() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo su - | |
| mkdir -p /opt/bin | |
| version=$(curl https://github.com/docker/compose/releases/latest -sLI -o /dev/null -w '%{url_effective}' | sed 's:.*/::') | |
| curl -L "https://github.com/docker/compose/releases/download/$version/docker-compose-$(uname -s)-$(uname -m)" -o /opt/bin/docker-compose | |
| chmod +x /opt/bin/docker-compose | |
| docker -v | |
| docker-compose -v | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.4-alpine | |
| ENV PATH /root/.yarn/bin:$PATH | |
| RUN apk update && apk upgrade && \ | |
| apk add --no-cache bash git openssh build-base nodejs tzdata | |
| RUN apk update \ | |
| && apk add curl bash binutils tar gnupg \ | |
| && rm -rf /var/cache/apk/* \ |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParentelem.clientLeft,elem.clientTop,elem.clientWidth,elem.clientHeightelem.getClientRects(),elem.getBoundingClientRect()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script can be used in "run & hope" mode or you can use it as a recipe to | |
| # do things manually - you probably want the latter if you really care about | |
| # the data in your databases. | |
| # Happy hacking | |
| # /Eoin/ | |
| # Tell bash to stop if something goes wrong | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew services stop postgresql | |
| initdb /usr/local/var/postgres9.6 -E utf8 | |
| pg_upgrade -d /usr/local/var/postgres -D /usr/local/var/postgres9.6 -b /usr/local/Cellar/postgresql/9.5.5/bin -B /usr/local/Cellar/postgresql/9.6.1/bin -v | |
| mv /usr/local/var/postgres /usr/local/var/postgres9.5 | |
| mv /usr/local/var/postgres9.6 /usr/local/var/postgres | |
| brew services start postgresql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Speed things up by not loading Rails env | |
| config.assets.initialize_on_precompile = false |