A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.
- xcode 5.1.1
- python 3.4.0
- Qt libraries 5.2.1
| #!/usr/bin/env python | |
| from flask import Flask, abort, request | |
| from uuid import uuid4 | |
| import requests | |
| import requests.auth | |
| import urllib | |
| CLIENT_ID = None # Fill this in with your client ID | |
| CLIENT_SECRET = None # Fill this in with your client secret | |
| REDIRECT_URI = "http://localhost:65010/reddit_callback" |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.
I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # source this code in a Bash shell ($ . django-csrftoken-login-demo.bash), | |
| # and run with a DB name as parameter (e.g. $ django-csrftoken-login-demo demo) | |
| django-csrftoken-login-demo() { | |
| # -- CHANGE THESE VALUES TO MATCH YOUR ACCOUNT -- | |
| local HOSTING_USERID=9988 | |
| local HOSTING_PANEL_USER='[email protected]' | |
| local HOSTING_PANEL_PASS='my secret login password' | |
| local HOSTING_DB_PREFIX='username_' | |
| local DB_NAME=$HOSTING_DB_PREFIX$1 |
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
| // REQUIRES: | |
| // moment.js - http://momentjs.com/ | |
| // USAGE: | |
| // {{ someDate | moment: [any moment function] : [param1] : [param2] : [param n] | |
| // EXAMPLES: | |
| // {{ someDate | moment: 'format': 'MMM DD, YYYY' }} | |
| // {{ someDate | moment: 'fromNow' }} |
| ############################################################################### | |
| # Helpful Docker commands and code snippets | |
| ############################################################################### | |
| ### CONTAINERS ### | |
| docker stop $(docker ps -a -q) #stop ALL containers | |
| docker rm -f $(docker ps -a -q) # remove ALL containers | |
| docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
| # exec into container |