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
## | |
## Source: https://chris.dziemborowicz.com/blog/2013/05/17/how-to-convert-msg-files-to-doc-files-using-powershell/ | |
## | |
## Usage: ConvertFrom-MsgToDoc * | |
## | |
## | |
function ConvertFrom-MsgToDoc | |
{ | |
[CmdletBinding()] |
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
function Remove-MsgAttachment | |
{ | |
[CmdletBinding()] | |
Param | |
( | |
[Parameter(ParameterSetName="Path", Position=0, Mandatory=$True)] | |
[String]$Path, | |
[Parameter(ParameterSetName="LiteralPath", Mandatory=$True)] |
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
Verifying my Blockstack ID is secured with the address 13CXKLBP4xcBB879iFbgCXwhfN6hjKXRc2 https://explorer.blockstack.org/address/13CXKLBP4xcBB879iFbgCXwhfN6hjKXRc2 |
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
(* | |
Send currently selected Airmail message to OmniFocus 2 quick entry box, then archive it. | |
Based on http://simplicitybliss.com/add-last-sent-email-to-omnifocus | |
and http://discourse.omnigroup.com/t/mail-to-quick-entry-applescript/500 | |
To install: | |
- Create a new Automator Service | |
- Cut/paste this into it | |
- Edit properties to your satisfaction |
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
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2016/02/29 17:26 | |
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
NOTES: | |
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
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
++ : 5 > iterm2_preexec_invoke_exec -x | |
++ /Users/njm/.iterm2_shell_integration.bash : iterm2_preexec_invoke_exec() 1 > '[' '!' -t 1 ']' | |
++ /Users/njm/.iterm2_shell_integration.bash : iterm2_preexec_invoke_exec() 6 > return | |
+ : 5 > source /Users/njm/.rvm/scripts/rvm |
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
require 'rubygems' | |
require 'matrix' | |
require 'lingua/stemmer' | |
require 'csv' | |
require 'erb' | |
require 'iconv' | |
require 'sanitize' | |
require './cleaner.rb' | |
STEMMER = Lingua::Stemmer.new |
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 USCode | |
SEARCH_ENDPOINT = "http://uscode.house.gov/uscode-cgi/fastweb.exe?search" | |
@@search_params = { | |
:view => "uscview", | |
:db2 => "t01t04" , | |
:db3 => "t05t08" , | |
:db4 => "t09t12" , | |
:db5 => "t13t16" , | |
:db6 => "t17t20" , | |
:db7 => "t21t25" , |
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 ruby | |
input = STDIN.read | |
input.gsub!(/^\=+\n ?(.*?)\n\=+/,"# \\1") | |
input.gsub!(/^-+\n\d+ (.*?)\n-+/,"## \\1") | |
input.gsub!(/^\d+\.\d+ (.*)/,"### \\1") | |
input.gsub!(/^\d+\.\d+\./,"@") | |
input.gsub!(/^@\d+ /,"- ") | |
input.gsub!(/^@\d+\.\d+ /,"\t- ") |
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 php | |
<?php | |
$str = `pbpaste`; | |
$find = array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"); | |
$replace = array("'", "'", '"', '"', '-', '--', '...'); | |
echo str_replace($find, $replace, $str); |