Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']| #!/bin/bash | |
| # Locate the history file in your profile, and copy it to the same folder as this script. | |
| # On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History | |
| # On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History | |
| sqlite3 History <<! | |
| .headers on | |
| .mode csv | |
| .output out.csv |
Instructions courtesy of @chancelionheart:
Access the Settings menu by clicking the Options icon in the upper-right corner of the browser window. It is the icon with three horizontal lines stacked on top of each other. Click on “Settings” near the bottom of the Options menu.
Under the “Search” heading in the Settings menu, click the "Manage search engines" button.
At the bottom of the Search Engines window that comes up, enter the following: Name: Use whatever you like (I used "Webster's Revised 1913+1928 Dictionary") Keyword: Also whatever you like, I just use 'd' for easy access. Url: http://machaut.uchicago.edu/?resource=Webster%27s&word=%s&use1913=on&use1828=on (replaces the search term with %s, what google chrome uses for the query)
Download a Kindle-compatible version of the dictionary here. Unzip the .rar archive.
Get the "Send to Kindle" program on your computer. Here's the link for the Mac.
Right-click your recently downloaded (unzipped) dictionary file, and click the "Send to Kindle" menu item. It will arrive on your Kindle shortly.
Once the dictionary has arrived, go to your settings -- on my newish paperwhite, it's at Home > Settings > Device Options > Language and Dictionaries > Dictionaries > English. Choose the Webster's 1913.
| alias rmdbc="find . -name *\ \(*conflicted* -exec rm {} \;" # recursively delete Dropbox conflicted files | |
| # and/or (smart idea from Gordon Fontenot) | |
| alias rmdbcsafe="find . -name *\ \(*conflicted* -exec mv {} ~/DropboxConflicts/ \;" # recursively move Dropbox conflicted files to temp folder | |
| # or... via TJ Luoma | |
| alias rmdbctrash="find . -name *\ \(*conflicted* -exec mv -v {} ~/.Trash/ \;" # recursively move Dropbox conflicted files to Trash | |
| # More advanced idea combining ideas from @modernscientist and @GFontenot would be | |
| # Hazel or launchd script to move conflicted files to temp folder once a day, and Hazel or launchd script to delete files older than [x] | |
| # Or schedule TJ's idea of moving to Trash and skipping intermediate folder while still maintaining the ability to review | |
| # hmmmm... |
| #!/bin/sh | |
| # script for optimizing images in a directory (recursive) | |
| # pngcrush & jpegtran settings from: | |
| # http://developer.yahoo.com/performance/rules.html#opt_images | |
| # pngcrush | |
| for png in `find $1 -iname "*.png"`; do | |
| echo "crushing $png ..." | |
| pngcrush -rem alla -reduce -brute "$png" temp.png |