Skip to content

Instantly share code, notes, and snippets.

diff --git a/node_modules/react-native-snapchat-login/SnapchatLogin.podspec b/node_modules/react-native-snapchat-login/SnapchatLogin.podspec
index beb8d05b9..a9f135afc 100644
--- a/node_modules/react-native-snapchat-login/SnapchatLogin.podspec
+++ b/node_modules/react-native-snapchat-login/SnapchatLogin.podspec
@@ -19,6 +19,5 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.dependency "React"
- s.dependency "SnapSDK/SCSDKLoginKit"
+ s.dependency "SnapSDK/SCSDKLoginKit", "~> 1.3.5"
@peteroid
peteroid / random-ua.sh
Last active August 30, 2017 15:23 — forked from kopiro/random-ua.sh
Random User agent in BASH
# On Mac, install `gsort` with `brew install coreutils`
UA=$(cat ua.txt | gsort -R | head -1)
@peteroid
peteroid / centos-skygear-setup.sh
Last active May 24, 2017 18:16
Install skygear server on centos x64. Config with postgresql, nginx
## obtain the official binary
# get the lastest release on https://github.com/SkygearIO/skygear-server/releases/latest
wget https://github.com/SkygearIO/skygear-server/releases/download/v0.24.0/skygear-server-linux-amd64.tar.gz
# uncompress the file
tar zxvf ./skygear-server-linux-amd64.tar.gz -C .
## postgresql
# setup postgresql. mostly follow instructions on https://wiki.postgresql.org/wiki/YUM_Installation
# edit repo file to exclude postgresql. then install the rpm through the package manager
@peteroid
peteroid / centos-certbot-nginx-selinux.sh
Last active May 24, 2017 17:48
Setup Nginx with Certbot on Centos with some extras about SELinux
## as root!
sudo -s
# Cannot resolve host: mirrorlist blah blah
# need to add a standard nameserver, like Google DNS to /etc/resolv.conf
cat "nameserver 8.8.8.8" >> /etc/resolv.conf
# git is not installed
yum install git
# as root
sudo -s
# get certbot
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
# since AMI supports is experimental, need to add --debug flag
./certbot-auto --debug
# install nvm for node and npm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
# reload nvm
export NVM_DIR="/home/ec2-user/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
# install node 7
nvm install 7
@peteroid
peteroid / standard.sh
Last active March 21, 2017 10:58
Self standard for Shell
# based on POSIX
# POSIX in a nutshell: http://stackoverflow.com/questions/1780599/i-never-really-understood-what-is-posix
# $(cmd) > `cmd`
# ref: http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03
# check root
if [[ $EUID -ne 0 ]]; then
echo "Please grant permission!"
fi
@peteroid
peteroid / login.curl.sh
Created January 26, 2017 20:23
CLI for HKU auth
#!/bin/bash
# config and clean up the script
FILE_PREFIX="login.res"
# rm ./$FILE_PREFIX*
# abort the script if any error occur
set -e
echo "Welcome to HKU Auth CLI v0.1"
@peteroid
peteroid / node-and-npm-in-30-seconds.sh
Last active January 23, 2017 16:27 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl -L https://www.npmjs.org/install.sh | sh
# fix vi editor issue on mac
git config --global core.editor "vim"