Skip to content

Instantly share code, notes, and snippets.

View jason-shen's full-sized avatar
🗼
Coding........

Jason Shen jason-shen

🗼
Coding........
View GitHub Profile
@jason-shen
jason-shen / ubuntu-vpn-setup.md
Created May 15, 2018 17:19
vpn setup sh script
#!/bin/sh
set -eu
JANUS_REV=master
CONTAINER=false # if true, delete more for smaller image
JANUS_REPO=meetecho/janus-gateway
PREFIX=/opt/janus-gateway
SRCDIR=$HOME/src
@jason-shen
jason-shen / notes.md
Created November 24, 2018 09:18 — forked from matthewjberger/notes.md
How to make an electron app using Create-React-App and Electron with Electron-Builder.
@jason-shen
jason-shen / golang-tls.md
Created August 30, 2019 14:52 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@jason-shen
jason-shen / jssip.md
Created September 22, 2019 17:44 — forked from dtolb/jssip.md
JsSip Demo

#JSSIP with Catapult API ​ ##Prerequisites ​

  • Register for a Catapult (Bandwidth Application Platform) account here
  • Register a SIP domain
  • Create an endpoint/user
  • If you want to make calls to the PSTN (normal phones) you will need a server to handler events from Catapult
  • Make phone calls ​
@jason-shen
jason-shen / .bashrc
Created April 25, 2020 17:52 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
@jason-shen
jason-shen / RN_flatList_example.js
Created July 2, 2020 18:11 — forked from SergeyLipko/RN_flatList_example.js
Example of using RN FlatList component with pagination and pull-refreshing
import React from 'react';
import {
View,
Text,
FlatList,
StyleSheet
} from 'react-native';
import { ListItem } from 'react-native-elements';
class Users extends React.Component {
#lock
defaults write com.apple.dock contents-immutable -bool true
#unlock
defaults write com.apple.dock contents-immutable -bool false
userEffect(() => {
console.log(“ComponentDidUpdate”
});
userEffect(() => {
console.log(“ComponentDidMount”
});
userEffect(() => {
console.log(“will run when x changes”