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/python | |
import os | |
import re | |
import urllib2 | |
AUTH_FILE = '~/vpnbook-openvpn-auth' | |
resp = urllib2.urlopen('http://www.vpnbook.com/freevpn') | |
content = resp.read() | |
match = re.search(r'(?:<\w+>)?Password(?:</\w+>)?: (?:<\w+>)?([a-zA-Z0-9]{8})(?:</\w+>)?', content) |
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
"""Fancy config. | |
This module reads data from ``default.cfg`` and ``config.cfg`` using | |
:class:`RawConfigParser` and stores sections in the module's namespace. | |
Let's take the following ``config.cfg`` for example:: | |
[section1] | |
key1 = 1 | |
key2 = 2 |
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
"""Parse positional and keyword arguments from `sys.argv`. | |
We all like :class:`argparser.ArgumentParser`. It is a great tool to build | |
command-line interfaces with many nice features and automatic coercing. | |
But sometimes it's just too verbose. At times all we need is to pass arguments | |
to a function from CLI. And I will help you. | |
Consider this ``square.py`` program:: |
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
""" | |
Mouse bindings and helpers for Dark Souls II | |
============================================ | |
Features | |
-------- | |
- Attack with left and right mouse buttons with no delay. | |
- Execute combos in one key press. | |
- Close dialogs with Escape. |
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 python | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
import subprocess | |
import getpass | |
class CBExit(object): | |
def __init__(self): |
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
package semaphore | |
type Semaphore chan bool | |
func (self Semaphore) Acquire() { | |
self <- true | |
} | |
func (self Semaphore) Release() { | |
<-self |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document url-prefix("https://getpocket.com/a/read") { | |
/* Common */ | |
.page-readerdark .reading_progress_bar, | |
.page-readersepia .reading_progress_bar { | |
background-color: #2aa198; /* cyan */ | |
} | |
code, pre { | |
font-size: 19px; |
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
'use strict' | |
var browserify = require('browserify') | |
var gulp = require('gulp') | |
var plumber = require('gulp-plumber') | |
var gutil = require('gulp-util') | |
var uglify = require('gulp-uglify') | |
var buffer = require('vinyl-buffer') | |
var source = require('vinyl-source-stream') | |
var watchify = require('watchify') |
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
"""closingqueue.py | |
Inspired by `pychan <https://github.com/stuglaser/pychan>`_. | |
""" | |
import asyncio | |
class ClosingQueue(asyncio.Queue): | |
"""A subclass of Queue with close() method. |
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
# Based on dark mode of Solarized color scheme http://ethanschoonover.com/solarized | |
ForegroundColour=131,148,150 | |
BackgroundColour=0,43,54 | |
CursorColour=131,148,150 | |
Black=7,54,66 | |
BoldBlack=0,43,54 | |
Red=220,50,47 | |
BoldRed=203,75,22 | |
Green=133,153,0 | |
BoldGreen=88,110,117 |
OlderNewer