As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
| """Based on https://stackoverflow.com/a/38866913/23325241""" | |
| import re | |
| # Attempt to import requests and handle if it's missing | |
| try: | |
| import requests | |
| requests_available = True | |
| except ImportError: | |
| requests_available = False |
| import requests | |
| from tqdm import tqdm | |
| def download(url: str, fname: str, chunk_size=1024): | |
| resp = requests.get(url, stream=True) | |
| total = int(resp.headers.get('content-length', 0)) | |
| with open(fname, 'wb') as file, tqdm( | |
| desc=fname, | |
| total=total, |
| #!/usr/bin/env bash | |
| # Fix the third party mess. Run this after a `npm/yarn` install. | |
| # This has (hopefully) been addressed by https://github.com/facebook/react-native/pull/21458, | |
| # but at the time of writing (30/10/18) has not been merged into an official RN release. | |
| echo "Fixing React Native third party folder..." | |
| rm -rf ~/.rncache | |
| WD=$(pwd) | |
| cd node_modules/react-native | |
| rm -fr third-party |
| #!/usr/bin/env bash | |
| # | |
| # Script to change underscan/overscan value of a monitor on OS-X. | |
| # © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License. | |
| # | |
| #——————————————————————————————————————————————————————————————————————————————————————————— | |
| # EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS". | |
| # OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR | |
| # IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF | |
| # MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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.
| bin/rails:6: warning: already initialized constant APP_PATH | |
| ***/bin/rails:6: warning: previous | |
| definition of APP_PATH was here Usage: rails COMMAND [ARGS] | |
| The most common rails commands are: generate Generate new code | |
| (short-cut alias: "g") console Start the Rails console (short-cut | |
| alias: "c") server Start the Rails server (short-cut alias: "s") | |
| dbconsole Start a console for the database specified in | |
| config/database.yml | |
| (short-cut alias: "db") new Create a new Rails application. "rails new my_app" creates a |
| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |