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| # File adapted from: https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess | |
| # ------------------------------------------------------------------------------ | |
| # | File Types | | |
| # ------------------------------------------------------------------------------ | |
| # Allow access from all domains for web fonts | |
| <IfModule mod_headers.c> | |
| <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$"> |
| -- AppleScript -- | |
| -- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
| -- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| -- This method is as good as its JXA counterpart. | |
| -- Webkit variants include "Safari", "Webkit", "Orion". | |
| -- Specific editions are valid, including "Safari Technology Preview". | |
| -- "Safari" Example: | |
| tell application "Safari" to return name of front document |
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| function convertSheet2Json(sheet) { | |
| // first line(title) | |
| var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn()); | |
| var firstRowValues = firstRange.getValues(); | |
| var titleColumns = firstRowValues[0]; | |
| // after the second line(data) | |
| var lastRow = sheet.getLastRow(); | |
| var rowValues = []; | |
| for(var rowIndex=2; rowIndex<=lastRow; rowIndex++) { |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| <?xml version="1.0" encoding="utf-8"?> | |
| <widget xmlns="http://openajax.org/metadata" spec="1.0" id="tag:adobe.com,2012-03:edge:oam:compid:mydocument" name="mydocument" version="1"> | |
| <description type="text/html"><![CDATA[Widget Exported from Tumult Hype]]></description> | |
| <category name="Adobe Edge Animation"/> | |
| <remarks>Compatible with: InDesign CC, Dreamweaver CC, Muse</remarks> | |
| <!-- |
In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So ⌘ + D does not mean hold shift. ⌘ + Shift + D does of course.
| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| # Add field | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
| # { | |
| # "hello": "world", | |
| # "foo": "bar" | |
| # } | |
| # Override field value | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
| { |
| xmlstarlet sel -t -m "//host/ports/port/script" -o "{ip:'" -v "ancestor::host/address[@addrtype='ipv4']/@addr" -o "', hostname:'" -v "concat(ancestor::host/hostnames/hostname/@name,'')" -o "', proto:'" -v "../@protocol" -o "', port:" -v "../@portid" -o ", service:'" -v "../service/@name" -o "', script:'" -v "@id" -o "', script-output:'" -v "@output" -o "'}" -n <XML INPUT FILE> |