Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Google 阅读器中 Dray 的订阅</title> | |
</head> | |
<body> | |
<outline title="Linux" text="Linux"> | |
<outline text="Linux公社 - Linux系统门户网站" | |
title="Linux公社 - Linux系统门户网站" type="rss" | |
xmlUrl="http://www.linuxidc.com/rssFeed.aspx" htmlUrl="http://www.linuxidc.com/"/> |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.
Step 1:
sudo apt-get install build-essential unzip python-dev libaio-dev
Step 2. Click here to download the appropriate zip files required for this. You'll need:
#!/user/bin/python | |
import json | |
class DocumentBase(object): | |
def traversal_for_init_dict(self, items): | |
for k in items: | |
if type(items[k]) == dict: | |
setattr(self, k, DocumentDict(**items[k])) | |
elif type(items[k]) == list: |
import sys, time, datetime | |
from copy import copy, deepcopy | |
from collections import OrderedDict | |
import string | |
import math | |
import win32com.client | |
import traceback | |
# Sample code for accessing MSProject | |
# 2014 (C) Zohar Lorberbaum |
Vagrant 1.6 has a really nice feature which allows you to run a docker environment from any machine that can run Vagrant (even a Mac)
Behind the scenes, Vagrant creates a host VM which runs the docker containers.
The "gotcha" is: Vagrant won't automatically forward ports all the way back from the container->vagrant host VM->your mac. You have to do that step manually, by configuring your own host VM for Vagrant to use for hosting docker containers with. That host VM is told what ports to open.
Here's how I set up a local Wordpress development testing container.
// ==UserScript== | |
// @name 百度网盘aria2导出工具 | |
// @author acgotaku311 | |
// @description 一个方便吧百度网盘的Aria2rpc导出的脚本。 | |
// @encoding utf-8 | |
// @include http://*n.baidu.com/s/* | |
// @include http://*n.baidu.com/disk/home* | |
// @include http://*n.baidu.com/share/link* | |
// @include https://*n.baidu.com/s/* | |
// @include https://*n.baidu.com/disk/home* |