Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| function keepTrying(otherArgs, promise) { | |
| promise = promise||new Promise(); | |
| // try doing the important thing | |
| if(success) { | |
| promise.resolve(result); | |
| } else { | |
| setTimeout(function() { | |
| keepTrying(otherArgs, promise); |
| #!/usr/bin/env ruby | |
| # | |
| # Convert blogger (blogspot) posts to jekyll posts | |
| # | |
| # Basic Usage | |
| # ----------- | |
| # | |
| # ./blogger_to_jekyll.rb feed_url | |
| # | |
| # where `feed_url` can have the following format: |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
As configured in my dotfiles.
start new:
tmux
start new with session name:
| @ECHO OFF | |
| setlocal | |
| cd /D %~dp0 | |
| SET WebSiteProjectFilePath=%1 | |
| SET WebSiteProdPath=C:\inetpub\%2 | |
| SET IISAppPool=%2 | |
| SET IISBinding=%3 | |
| SET IISSiteName=%4 | |
| SET SqlServer=%5 |
| #!/bin/bash | |
| HOSTSFILE="/etc/hosts" | |
| BAKFILE="$HOSTSFILE.bak" | |
| DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
| IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
| URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
| backup() | |
| { |
| # | |
| # Assumptions | |
| # | |
| # 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git | |
| # tag set for that commit in GitHub that is "v1.0.0.73". | |
| # | |
| # 2. You have TeamCity label each successful build in GitHub with the format | |
| # "v{build number}. Sidenote: it appears that TeamCity only labels the | |
| # default branch, but not feature branches. | |
| # |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| var textExtractor = new TextExtractor(); | |
| var result = textExtractor.Extract(@"c:\projects\tikaondotnet\src\TikaOnDotNet.Tests\files\Tika.doc"); | |
| // View the result on the console | |
| Console.WriteLine("Content Type: " + result.ContentType); | |
| Console.WriteLine("\n\n" + result.Text.Trim()); |