This file contains hidden or 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 __future__ import print_function | |
import argparse | |
import lxml.etree as ET | |
import urllib | |
parser = argparse.ArgumentParser(description="Transforms and Validates XML") | |
parser.add_argument("--feeds", help="the text file that holds the urls to be validated", default="feeds.txt") | |
parser.add_argument("--log", help="the output log file that reports all errors", default="log.txt") | |
parser.add_argument("-v", "--verbose", help="increase output verbosity", action="store_true") |
This file contains hidden or 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
using System.Runtime.Remoting.Messaging; | |
using System.Threading; | |
// capture the ui thread context for completion callback | |
private SynchronizationContext context = SynchronizationContext.Current; | |
Action action = () => { | |
/* do some stuff */ | |
}; | |
This file contains hidden or 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
Rect r = EditorGUILayout.BeginVertical(); | |
EditorGUI.ProgressBar(r, 0.1f, "Doing something helpful"); | |
GUILayout.Space(18); | |
EditorGUILayout.EndVertical(); |
This file contains hidden or 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
// fetch "grab this part!" | |
Regex.Match("blah blah (grab this part!)", @"\(([^)]*)\)").Groups[1].Value | |
// source: http://stackoverflow.com/questions/378415/how-do-i-extract-a-string-of-text-that-lies-between-two-parenthesis-using-net |
This file contains hidden or 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
# rename multiple files in a directory using regex | |
# source: http://stackoverflow.com/questions/5574648/use-regex-powershell-to-rename-files | |
ls | %{ ren $_ $($_.name -replace '(TestFile_\w+)(\d+)(\.txt)', '${1}20140910${3}')} |
OlderNewer