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 sendError(message, url, lineNum) { | |
| var i; | |
| // First check the URL and line number of the error | |
| url = url || window.location.href; | |
| lineNum = lineNum || 'None'; | |
| // If the error is from these 3rd party script URLs, we ignore | |
| // We could also just ignore errors from all scripts that aren't our own | |
| var scriptURLs = [ |
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.
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
| /** | |
| * This module is a variant which supports document.write. If you need document.write use this instead | |
| * Author: Deepak Subramanian @subudeepak(https://github.com/subudeepak) | |
| * Distributed under MIT License | |
| */ | |
| /*global angular */ | |
| (function (ng) { | |
| 'use strict'; | |
| app.directive('script', function() { | |
| return { |
| app = angular.module 'MyApplication' | |
| app.filter 'noHTML', -> | |
| (text) -> text.replace(/</g, '<').replace(/>/g, '>').replace(/&/, '&') if text? | |
| app.filter 'newlines', ($sce) -> | |
| (text) -> $sce.trustAsHtml(if text? then text.replace(/\n/g, '<br />') else '') | |
| app.controller 'testCtrl', ($scope) -> | |
| $scope.iroha = 'いろはにほへと ちりぬるを\nわかよたれそ つねならむ\nうゐのおくやま けふこえて\nあさきゆめみし ゑひもせす' |
| #include <stdio.h> | |
| #include <math.h> | |
| int main(int argc, char **argv) { | |
| int n = 1111111; | |
| printf("%d", n); | |
| int b = 10; | |
| int buffer = n % 10; n /= 10; |