| 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 |
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
| Part | Description | |
|---|---|---|
| 47-011053-004 | Deflection Chain Gear w/Bearing Complete | |
| 11-051772-001 | Lockwasher (12 mm) | |
| 47-011130-004 | Bearing Bolt | |
| 47-011245-003 | Lower Chain Guide | |
| 11-052601-001 | Carriage Bolt (8 mm x 30 mm) | |
| 11-051704-001 | Hex Nut (8 mm) | |
| 11-051770-001 | Lockwasher (8 mm) | |
| 47-011135-000 | N.A. Elevator Frame w/Felt Backing | |
| 47-011276-003 | Upper Chain Guide |
| #!/usr/bin/env ruby | |
| print "What is the URL of your Apple Downloads resource?\nURL:" | |
| url = gets.strip | |
| print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: " | |
| token = gets.strip | |
| command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads" |
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |
: By the power of this magic string: ex: set ft=markdown ;:<<'```shell' #, this file is now both a markdown document and an executable shell script. chmod +x it and try running it!
The above line does just what it says. More specifically, when placed within in the first 5 lines and preceded only by blank lines or #-prefixed markdown headers:
- The first part of the magic string makes github and various editors (e.g. atom with the vim-modeline packge) treat the file as having markdown syntax (even if the file doesn't have an extension)
- The second part (if run in a shell), makes the shell skip execution until it encounters the next
```shellblock.
(The line also has to start with a : so that it's valid shell code.)
| ''' | |
| Using OpenCV takes a mp4 video and produces a number of images. | |
| Requirements | |
| ---- | |
| You require OpenCV 3.2 to be installed. | |
| Run | |
| ---- | |
| Open the main.py and edit the path to the video. Then run: |
A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.
FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.
To list all global metadata tags for a media file, just set an input but no output file.
| if exists("*ToggleBackground") == 0 | |
| function ToggleBackground() | |
| if &background == "dark" | |
| set background=light | |
| else | |
| set background=dark | |
| endif | |
| endfunction | |
| command BG call ToggleBackground() |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)