Skip to content

Instantly share code, notes, and snippets.

View gongzili456's full-sized avatar
🎉
Just For Fun

Rory gongzili456

🎉
Just For Fun
View GitHub Profile
@gongzili456
gongzili456 / install-redis.sh
Created July 19, 2016 09:38 — forked from four43/install-redis.sh
Install Redis
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
#!/bin/bash
cd ~
wget https://nodejs.org/dist/v6.6.0/node-v6.6.0-linux-x64.tar.xz
cd /usr/local
sudo tar --strip-components 1 -xf ~/node-v6.6.0-linux-x64.tar.xz
node -v
#!/bin/bash
sudo yum install epel-release
sudo yum install nginx
sudo service nginx start
sudo su -
Password: (パスワード入力)
# yumリポジトリ追加
yum install -y http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum install -y mysql-community-server mysql-community-devel
# mysql設定ファイル編集
vim /etc/my.cnf
@gongzili456
gongzili456 / osx-for-hackers.sh
Created November 17, 2016 02:45 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
mysql -uroot -proot -h127.0.0.1 databasename < backupfilename
# 1. install shadowsocks
sudo pip install shadowsocks
sslocal -s 服务器域名或IP -p 服务器端口号 -k “密码” -l 1080 -t 600 -m rc4-md5
# append proxy=socks5://127.0.0.1:1080 to /etc/yum.conf
# update iptables to 1.4.21
wget http://ftp.netfilter.org/pub/iptables/iptables-1.4.21.tar.bz2
tar -xjf iptables-1.4.21.tar.bz2
cd iptables-1.4.21
To get Docker running on the AWS AMI you should follow the steps below (these are all assuming you have ssh'd on to the EC2 instance).
Update the packages on your instance
[ec2-user ~]$ sudo yum update -y
Install Docker
[ec2-user ~]$ sudo yum install docker -y
Start the Docker Service
yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
yum install git
const COS = require('cos-nodejs-sdk-v5')
const params = {
AppId: '',
SecretId: '',
SecretKey: '',
}
const cos = new COS(params)