- Open terminal and run the following command to install
Homebrew:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Update
Homebrewwith the following command:brew update - Install
MongoDBpackage:brew install mongodb - Create the data directory:
mkdir -p /data/db - Set correct permissions for the data directory:
sudo chown -R `id -un` /data/db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| email = [email protected] | |
| name = dongy7 | |
| [alias] | |
| # View abbreviated SHA, description, and history graph of the latest 20 commits | |
| l = log --pretty=oneline -n 20 --graph --abbrev-commit |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.
The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import signal, os | |
| import argparse | |
| try: | |
| import pip | |
| except: | |
| raise Exception('Pip is not installed') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| from sys import argv, stderr | |
| def imgToHexStr(img_filename, size=(16,16)): | |
| """Returns a hex string representing a resized image in 4:4:4 RGB.""" | |
| img = Image.open(img_filename, 'r') | |
| img = img.resize(size, Image.NEAREST) | |
| img = img.convert(mode='RGB') | |
| imgdata = [(r,g,b) for (r,g,b) in list(img.getdata())] |