Skip to content

Instantly share code, notes, and snippets.

View ldong's full-sized avatar
❤️
Love & Peace

Alan Dong ldong

❤️
Love & Peace
  • Sunnyvale, CA
View GitHub Profile

Python Fast Track

Speaker: Rick Copeland

3rd session

String processing and regular expressionss

  • String interpolation
  • String methods

##Day 2 Agenda

Author: Rick Copeland

Date: June 17, 2014

Session 3, the second half

function python_finder {
python_library="-DPYTHON_LIBRARY="
python_include="-DPYTHON_INCLUDE_DIR="
# python_library="/Users/ldong/.pyenv/versions/2.7.6/lib/python2.7/config"
# python_include="/Users/ldong/.pyenv/versions/2.7.6/lib/python2.7/site-packages"
# The CMake 'FindPythonLibs' Module does not work properly.
# So we are forced to do its job for it.
python_prefix=$(python-config --prefix | sed 's/^[ \t]*//')
if [ -f "${python_prefix}/Python" ]; then

Special Symbols

星號符號 1

★☆✡✦✧✩✪✫✬✭✮✯✰

星號符號 2

⁂⁎⁑☸✡✢✣✤✥✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❃❇❈❉❊❋*

@ldong
ldong / fix_relink_virtualbox_to_vagrant.md
Last active August 3, 2016 02:06
Relink vbox to vagrant
@ldong
ldong / git_tutorial.md
Last active August 29, 2015 14:03
A git common commands I created for other people

You are gitting this

git diff

git diff --name-only SHA1 SHA2
git diff --name status [TAG|SHA1]

git ls-files ls-tree

Python Fast Track

Date: July 1, 2014

Speaker: Rick Copeland

Object oriented

Methods access and visibility

@ldong
ldong / headless_browsers.md
Last active August 29, 2015 14:03 — forked from evandrix/README.md
A list of headless browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
@ldong
ldong / md_to_rst.sh
Last active August 18, 2019 18:26 — forked from hugorodgerbrown/md_to_rst.sh
convert markdown to rst files
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .md file
@ldong
ldong / rst_to_md.sh
Last active December 8, 2020 17:40
Convert rst to md files
# This script was created to convert a directory full
# of rst files into md equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .rst files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .rst file