Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 python3 | |
# Copyright 2014 Brett Slatkin, Pearson Education Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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
@pytest.fixture | |
def url_checker(): | |
from pyramid.scripts.pviews import PViewsCommand | |
from pyramid.request import Request | |
from pyramid.paster import bootstrap | |
def view_match(url): | |
pviews = PViewsCommand([None, os.path.join(here, '../', 'development.ini'), url], | |
quiet=True) | |
config_uri = pviews.args[0] |
This file contains 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
#!/bin/bash | |
# Guide to install L2TP-IPSEC VPN Server on a Raspberry Pi with ArchLinux | |
# Used parts of several instructions, | |
# http://nls.io/setup-an-ipsec-l2tp-vpn-with-text-or-ldap-auth-on-arch-linux/ | |
# https://smileykeith.com/2014/01/27/ipsec-l2tp-vpn-on-a-raspberry-pi-running-arch-linux/ | |
# http://linux.tips/tutorials/how-to-setup-l2tp-vpn-server-on-raspberry-pi | |
# Tested and works with OSX and iOS 7.1 supplied vpn client |
(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.
JSON
TodoMVC in Om + Sablono + core.async (well, core.async not so much in the end)
This is a result of a three-ish hours long try to understand Om better on a TodoMVC example. Next steps would be finishing implementing rest of the functionality as dictated by the app specification, and then refactoring. And then some more refactoring. And then ...
I recorded a screencast of this: http://youtu.be/7j133D79Vaw
( 淡入 一群身著制服,表情嚴肅的軍官。)
會議桌的主位上,一位資深高階 將軍 正在說話。
將軍:報告已經證實了,紐約市已經…被殭屍占領了。
上校:又來了?明明 28 天前才發生過一次殭屍入侵!
將軍:這些僵屍…不一樣。它們是… 哲學 僵屍。
This file contains 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 wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid.response import Response | |
from pyramid.compat import text_type | |
from sqlalchemy.orm import scoped_session | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base |
NewerOlder