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 / gist:620361bced194dfe5f3f4454759a2314
Created January 13, 2021 07:43 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jason-shen
jason-shen / access_postgresql_with_docker.md
Created December 9, 2020 17:06 — forked from MauricioMoraes/access_postgresql_with_docker.md
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf

@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 {
@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
@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 / 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 / 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.
#!/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 / .editorconfig
Created May 8, 2018 09:59 — forked from EQuimper/.editorconfig
My Editor Config Setup
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@jason-shen
jason-shen / gist:3c68c3bdfe1f50053ca403e9c6f54e5e
Created May 8, 2018 09:54 — forked from EQuimper/gist:2b09f6b76bddf3c00d543c7c897dea14
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: