Skip to content

Instantly share code, notes, and snippets.

View orchestor's full-sized avatar
🎯
Focusing

Lin Wang orchestor

🎯
Focusing
  • Fremont, CA
View GitHub Profile
@orchestor
orchestor / small.js
Last active July 31, 2018 21:43
javascript 小程序
// 如何过滤一个数组
var words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
const result = words.filter(word => word!= 'limit');
console.log(result);
// expected output: Array ["exuberant", "destruction", "present"]
@orchestor
orchestor / Redis.sh
Created July 31, 2018 17:03 — forked from nrollr/Redis.sh
Install Redis via Homebrew
#!/bin/bash
brew install redis # Install Redis using Homebrew
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl
# homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf
redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop
redis-cli ping # Check if the Redis server is running
@orchestor
orchestor / emacs_header_directions.md
Created June 26, 2018 00:51 — forked from barbarj/emacs_header_directions.md
How to put 42 header in emacs
  1. Clone the repo from https://github.com/sullivanv/emacs
  2. Move all of the files from inside of that directory into ~/.emacs.d, including the hidden file .emacs
  3. If you don't have a ~/.emacs.d directory, create one.
  4. Navigate to ~/.emacs.d and rename .emacs to init.el
  5. Open emacs and C-c C-h
  6. You've got it!

How to fix the email in your header

  1. In your home directory, find, or create if needed, a file called .zshrc
  • If your not at 42, you'll likely not be using zshell, so the file should instead be .bashrc
@orchestor
orchestor / nodejs-cheatsheet.js
Created March 21, 2018 17:32 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@orchestor
orchestor / nodejs-cheatsheet.js
Created March 21, 2018 17:32 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@orchestor
orchestor / installCaffe.sh
Created August 15, 2017 20:43 — forked from jetsonhacks/installCaffe.sh
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
@orchestor
orchestor / installCaffe.sh
Created August 15, 2017 20:43 — forked from jetsonhacks/installCaffe.sh
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
@orchestor
orchestor / installJedroid.sh
Created August 15, 2017 20:41 — forked from jetsonhacks/installJedroid.sh
Install Jedroid onto SD card - NVIDIA Jetson TK1
#!/bin/sh
# Install Jedroid 1.3 on SD card
# Assumes a blank Ext4 formatted SD card is in the card reader
# The SD Card is not mounted
sudo mkdir /media/ubuntu/jedroidInstall
sudo mount -t ext4 /dev/mmcblk1p1 /media/ubuntu/jedroidInstall
# Get Jedroid 1.3 from Google Drives
cd ~/Downloads
wget -O jedroid_v1.31.tar.bz2 https://googledrive.com/host/0B-lsw7HiSbj8cHJNTmF2RUV6RVE
wget -O jedroid_v1.31.tar.bz2.md5sum https://googledrive.com/host/0B-lsw7HiSbj8T2xFdjZFY0VadXM
恭喜大家又3:0获胜, 给大家大大的赞。球队对胜利饥渴,90分钟后做到了。来的球员都有着强大的意志,能够掌控比赛。恭喜一场一场比赛稳扎稳打,状态逐渐调整好打墨西哥联赛。上半场完全掌控比赛,但下半场25分钟体能能下降后,主动传接球失误增加导致控球率和成功率明显下降。
曹指导守得很好,但千里受伤消息让人难过,估计会缺阵几周。
目前球队还需要33个球员都挺身而出,不能每场比赛都是11人在战斗。为了更好的提高球队的能力,欢迎大家给教练组提建议。
祝大家周末愉快。
@orchestor
orchestor / index.html
Created March 28, 2017 22:53 — forked from arisetyo/index.html
Dynamic Real-time Chart Using Chart.js, Socket.io, and Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
<link rel="stylesheet" href="pure-min.css">