根据启动Bash Shell的方式不同,对Shell有两种分类方式
根据Shell的启动方式不同,可以将Shell分为
class MarchingSquares | |
STATE = { "0000" => :r, "1100" => :r, "0011" => :l, "1110" => :r, | |
"0100" => :r, "1000" => :u, "1011" => :u, "1001" => :u, | |
"0101" => :d, "1010" => :u, "0111" => :l, "0110" => :l, | |
"0001" => :d, "0010" => :l, "1101" => :d, "1111" => :r } | |
def self.find_shape(grid, w, h) | |
edge_pos = grid.index('1') | |
return nil if edge_pos.nil? |
#include "marching-squares.hh" | |
#include "point.hh" | |
#include "polygon.hh" | |
#include "douglas-peucker.hh" | |
#include <ps/canvas/canvas.hh> | |
#include <cstring> | |
#include <vector> |
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep mongo | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
launchctl remove homebrew.mxcl.mongodb | |
pkill -f mongod |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
# Update, upgrade and install development tools: | |
apt-get update | |
#apt-get -y upgrade | |
apt-get -y install git-core autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev | |
PREFIX="/usr/local" | |
RBENV_PREFIX="$PREFIX/rbenv" | |
BIN_PATH="$PREFIX/bin" | |
RBENV_GROUP="rbenv" |