Skip to content

Instantly share code, notes, and snippets.

View zaypen's full-sized avatar
🙈

zaypen

🙈
View GitHub Profile
alert("vulnerable for xss");
@zaypen
zaypen / emacs
Created June 20, 2018 05:46
/usr/local/bin/emacs
#!/usr/bin/env bash
APP="/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs"
if [ -x "$APP" ]; then
"$APP" $@
else
exit 1
fi

Pair with her - Game of Life (C/C++)

基础环境

  1. GitHub 账号
  2. git 或兼容客户端

推荐开发环境

编译器(任选其一)

  • IDE自带(如适用)
{
init: (elevators, floors) => {
const max = array => Math.max.apply(null, array);
const min = array => Math.min.apply(null, array);
const asc = (a, b) => a - b;
const desc = (a, b) => b - a;
const upPressedFloors = [];
const downPressedFloors = [];
const sortElevatorQueue = elevator => {
elevator.destinationQueue.sort(elevator.destinationDirection === 'up' ? asc : desc);
@zaypen
zaypen / idea
Last active December 14, 2016 13:48
Terminal shortcut with arguments supported for IntelliJ IDEA on macOS
#!/usr/bin/env bash
# Terminal shortcut with arguments supported for IntelliJ IDEA on macOS,
# put this file into `/usr/bin` or `/usr/local/bin` or anywhere in PATH,
# and use `chmod` to make it executable,
# then you could use `idea` in terminal to run IDEA.
IDEA_APP="IntelliJ IDEA.app"
if [ -x "/Applications/$IDEA_APP" ]; then
IDEA_PATH="/Applications"