Skip to content

Instantly share code, notes, and snippets.

View Manuel4131's full-sized avatar

alstonChang Manuel4131

View GitHub Profile
@Manuel4131
Manuel4131 / New a repo with git
Created June 10, 2015 14:03
[git][github] How to create a new repo at GitHub
1. The original setting steps can be found https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
2. Don't forget config your git user.email and user.name. (Optional)
> git config --global user.name "The one used in the GitHub"
> git config --global user.email "The one which is registred to the GitHub"
3.
3-1. Create a new repo@GitHub. Remember the URL.
Don't create the Readme or some other files. Add them later.
3-2. cd to your working repo
3-3.
@Manuel4131
Manuel4131 / slider.html
Last active August 29, 2015 14:26 — forked from kosso/slider.html
A very simple basic 'slider' bar in JavaScript and CSS
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#bar{
width:200px;
height:25px;
border:1px solid black;
position:relative;
Create the '''js/css''' files under '''static''' folder. You can organize them by your willing.
'''Static''' stands for '''no modification needed'''. In contrast, '''template''' may be variant
due to different '''models'''.
把不變動的的部分(js/css)放到 app/static/app/
app/xxx.js
The target to add a subdirectory is to avoid the name collision. If the collision happens,
the latter one would overlap the formmer one.
@Manuel4131
Manuel4131 / tmux-cheatsheet.markdown
Last active August 29, 2015 14:26 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Manuel4131
Manuel4131 / gist:b35d4a8e71b1fae837c1
Last active August 30, 2015 14:45
Markdown cheat sheet

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2007 朱昱任 (Yuren Ju) <yurenju -AT- gmail.com>
# Copyright (C) 2007 洪任諭(PCMan) <pcman.tw -AT- gmail.com>
# Copyright (C) 2008 林哲瑋 Zhe-Wei Lin (bill3321,雨蒼) <bill3321 -AT- gmail.com>
# Last Midified : 19 Dec 2008
# Install and config input method for one or more users.
# Released under GNU General Public License
import os
@Manuel4131
Manuel4131 / npm.md
Last active November 28, 2015 12:49

Install npm in your MAC.

For Macintosh, to install node.js is really simple

brew install node

After installing the node.js, you can check the version by typing:

@Manuel4131
Manuel4131 / gist:9ed245d1dae6b470ba325cb203619b4c
Created June 25, 2016 14:35 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@Manuel4131
Manuel4131 / gist:a02fba83914f18a1ea5b65b77ff2e1ca
Created July 31, 2016 12:45 — forked from crizCraig/gist:2816295
Download images from Google Image search using Python
import json
import os
import time
import requests
from PIL import Image
from StringIO import StringIO
from requests.exceptions import ConnectionError
def go(query, path):
"""Download full size images from Google image search.
Python Environment Setup
Update the `pip` to latest version; older version might have trouble with dependency
```python
pip3 install --upgrade pip
```
Then install `jupyter Notebook`
```python
pip3 install jupyter
```