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| /// The Jaro-Winkler edit distance between two strings (0 - 1) | |
| func editDistance(_ lhs: String, _ rhs: String) -> Double { | |
| return 1 - jaroWinklerSimilarity(Array(lhs), Array(rhs)) | |
| } | |
| /// Jaro-Winkler similarity between two strings (0 - 1) | |
| /// https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/ | |
| private func jaroWinklerSimilarity(_ s1: [Character], _ s2: [Character]) -> Double { | |
| var jaro = jaroSimilarity(s1, s2) |
| # `ERROR: Error installing nokogiri: | |
| # ERROR: Failed to build gem native extension. | |
| # | |
| # current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri | |
| # /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries | |
| # checking if the C compiler accepts ... yes | |
| # checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no | |
| # Building nokogiri using system libraries. | |
| # ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed. | |
| # *** extconf.rb failed *** |
| #!/usr/bin/perl | |
| # This filter changes all words to Title Caps, and attempts to be clever | |
| # about *un*capitalizing small words like a/an/the in the input. | |
| # | |
| # The list of "small words" which are not capped comes from | |
| # the New York Times Manual of Style, plus 'vs' and 'v'. | |
| # | |
| # 10 May 2008 | |
| # Original version by John Gruber: |
| # place in [app]/public so it gets compiled into the dist folder | |
| Options FollowSymLinks | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] |
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| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
| #!/bin/bash | |
| # | |
| # (Above line comes out when placing in Xcode scheme) | |
| # | |
| API_TOKEN=<TestFlight API token here> | |
| TEAM_TOKEN=<TestFlight team token here> | |
| SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
| PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
| #LOG="/tmp/testflight.log" |
/usr/local/libexec/usr/local/bin/closure, copy in the bash script shown belowchmod +x /usr/local/bin/closureEnjoy running closure
| #!/bin/sh | |
| # | |
| # This will abort "git commit" and remove the trailing whitespaces from the files to be committed. | |
| # Simply repeating the last "git commit" command will do the commit then. | |
| # | |
| # Put this into .git/hooks/pre-commit, and chmod +x it. | |
| if git rev-parse --verify HEAD >/dev/null 2>&1 | |
| then | |
| against=HEAD | |
| else |