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/sh | |
# Created by richmondwang | |
# Required: bash4, git1.7, sed, awk, grep | |
# | |
# This will 'delete' (git branch -dl) all branches | |
# containing a substring (prefix) that are already merged to origin/master | |
prefix="feature/richmond/" | |
# only delete my own branches |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.TimeoutException; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.support.PageFactory; | |
import org.openqa.selenium.support.pagefactory.FieldDecorator; | |
import org.openqa.selenium.support.ui.ExpectedCondition; | |
import org.openqa.selenium.support.ui.WebDriverWait; | |
import xxx.CustomFieldDecorator; |
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
class Month(object): | |
"""Validates a string as a Month of a year | |
Args: | |
return_type (int): NUMBER = 0, WORD = 1, FULL = 2 | |
msg (str): the message when it fails | |
""" | |
NUMBER = 0 | |
WORD = 1 | |
FULL = 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
<select name="timezone" > | |
<option disabled selected style='display:none;'>Time Zone...</option> | |
<optgroup label="US (Common)"> | |
<option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option> | |
<option value="America/New_York">New York (Eastern)</option> | |
<option value="America/Chicago">Chicago (Central)</option> | |
<option value="America/Denver">Denver (Mountain)</option> | |
<option value="America/Phoenix">Phoenix (MST)</option> | |
<option value="America/Los_Angeles">Los Angeles (Pacific)</option> |
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
# -*- coding: utf-8 -*- | |
from voluptuous import Optional | |
from operator import is_not | |
from functools import partial | |
class Concat(object): | |
""" | |
Creates a concatenated Optional Marker for voluptuous | |
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
# -*- coding: utf-8 -*- | |
from voluptuous import Marker, Schema | |
class StartsWith(Marker): | |
""" | |
A way to validate keys that start with a given prefix. | |
Example: | |
>>> from voluptuous.util import DefaultTo |
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
# -*- coding: utf-8 -*- | |
# pip install python-jose | |
from jose import jwt | |
token = "<token here>" | |
key = { | |
"alg": "RS256", | |
"e": "AQAB", | |
"kid": "+Sr66GHFIwrVWzl9N02mrm96OCoYbNktaekEhXs9+eM=", # <-- this should match the `kid` in the token's headers |
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
class SureDict(dict): | |
""" | |
This subclass is used for dicts with guaranteed values of children but | |
can still be used like a normal dict. | |
.. note:: | |
Note that only the top level will be of class SureDict, those children | |
whose values are of dict will remain dict. |
OlderNewer