-
Install the the
shadowsocks-libev
package from apt repository.sudo apt update sudo apt install shadowsocks-libev
-
Save
ss.json
as/etc/shadowsocks-libev/config.json
.
This file contains 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
import { useState, Fragment } from 'react' | |
import Script from 'next/script' | |
/** | |
* Facebook Customer Chat demo | |
* | |
* @see https://nextjs.org/docs/api-reference/next/script | |
* @see https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin/sdk/ | |
* @see https://developers.facebook.com/docs/javascript/reference/FB.init/ | |
*/ |
This file contains 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
Failed to load module '@vsintellicode/typescript-intellicode-plugin' from /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/node_modules: Error: Could not resolve JS module '@vsintellicode/typescript-intellicode-plugin' starting at '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/node_modules'. Looked in: | |
at Object.resolveJSModule (./.yarn/cache/typescript-patch-edef266e49-b8b689ef99.zip/node_modules/typescript/lib/tsserver.js:38253:19) | |
at Object.sys.require (./.yarn/cache/typescript-patch-edef266e49-b8b689ef99.zip/node_modules/typescript/lib/tsserver.js:157662:45) | |
at Function.Project.resolveModule (./.yarn/cache/typescript-patch-edef266e49-b8b689ef99.zip/node_modules/typescript/lib/tsserver.js:147790:35) | |
at ./.yarn/cache/typescript-patch-edef266e49-b8b689ef99.zip/node_modules/typescript/lib/tsserver.js:148867:36 | |
at Object.firstDefined (./.yarn/cache/typescript-patch-edef266e49-b8b689ef99 |
This file contains 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
import fs from "fs"; | |
import knex from "knex"; | |
import env from "./env"; | |
export default knex({ | |
client: "pg", | |
connection: { | |
ssl: env.PGSSLMODE === "verify-ca" && { | |
cert: fs.readFileSync(env.PGSSLCERT, "ascii"), |
This file contains 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
import React from 'react'; | |
import { useScrollY, useInnerWidth } from './hooks'; | |
function Example(props) { | |
const nodeRef = React.useRef(); | |
const scrollY = useScrollY(); | |
const innerWidth = useInnerWidth(nodeRef); | |
return ( | |
<pre ref={nodeRef} {...props}> |
This file contains 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
import React from 'react'; | |
import { fb } from '../utils'; | |
import { ConfigContext } from '../hooks'; | |
class CustomerChat extends React.PureComponent { | |
componentDidMount() { | |
this.timeout = setTimeout(() => { | |
fb(FB => this.timeout && FB.XFBML.parse()); | |
}, 2000); | |
} |
This file contains 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
import loadScript from 'load-script'; | |
let initialized = false; | |
let queue = []; | |
export function fb(callback) { | |
if if (initialized) { | |
callback(window.FB); | |
} else { | |
queue.push(callback); |
This file contains 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
version: "3" | |
services: | |
shadowsocks: | |
image: shadowsocks/shadowsocks-libev:edge | |
ports: | |
- "8388:8388" | |
environment: | |
- METHOD=aes-256-cfb | |
- PASSWORD=XXX |
import React from 'react';
import Menu from '@material-ui/core/Menu';
import RootRef from '@material-ui/core/RootRef';
import Typography from '@material-ui/core/Typography';
class MyComponent extends React.Component {
componentDidMount() {
document.addEventListener('selectionchange', this.handleSelect);
}