jq is useful to slice, filter, map and transform structured json data.
brew install jq
| #!/bin/bash | |
| # You'll need to have sox, pavucontrol and alsa-utils installed, and the snd_aloop kernel module loaded. | |
| # You can configure your system to load it on startup or load it manually with "sudo modprobe snd_aloop" | |
| # Once this is script is running, you need to start recording audio in the application of your | |
| # preference, open pavucontrol, go to the recording tab and change the recording source of that application | |
| # to "Monitor of Loopback ..." | |
| time=5 |
| #!/boot/bzImage | |
| # Linux kernel userspace initialization code, translated to bash | |
| # (Minus floppy disk handling, because seriously, it's 2017.) | |
| # Not 100% accurate, but gives you a good idea of how kernel init works | |
| # GPLv2, Copyright 2017 Hector Martin <[email protected]> | |
| # Based on Linux 4.10-rc2. | |
| # Note: pretend chroot is a builtin and affects the current process | |
| # Note: kernel actually uses major/minor device numbers instead of device name |
| #! /bin/bash -ex | |
| # Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs. | |
| # | |
| # Requirements: | |
| # * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/ | |
| # * Dan Stahlke's https://github.com/gina-alaska/dans-gdal-scripts | |
| # * convert (image-magick) | |
| # | |
| # Reference info: |
| -- betterchapters.lua | |
| -- seeks forward until a black screen appears. | |
| -- default keybinding: b | |
| -- Keybind names: skip_scene | |
| script_name = mp.get_script_name() | |
| detect_label = string.format("%s-detect", script_name) | |
| detecting = false | |
| threshold = 0.9 | |
| detection_span = 0.05 | |
| negation = false |
| --[[ | |
| mpv 5-bands equalizer with visual feedback. | |
| Copyright 2016 Avi Halachmi ( https://github.com/avih ) | |
| License: public domain | |
| Default config: | |
| - Enter/exit equilizer keys mode: ctrl+e | |
| - Equalizer keys: 2/w control bass ... 6/y control treble, and middles in between | |
| - Toggle equalizer without changing its values: ctrl+E (ctrl+shift+e) |
| #!/usr/bin/env python | |
| from __future__ import print_function, unicode_literals | |
| import operator | |
| import psycopg2 | |
| import psycopg2.extras | |
| import io | |
| import json | |
| import sys | |
| import logging |
| -- Allow changing a property with by zoom-adjusted amount | |
| function zoom_invariant_add(prop, amt) | |
| amt = amt / 2 ^ mp.get_property_number("video-zoom") | |
| mp.set_property_number(prop, mp.get_property_number(prop) + amt) | |
| end | |
| -- Resets the pan if the entire image would be visible | |
| function zoom_check_center() | |
| local zoom = mp.get_property_number("video-zoom") | |
| local rot = mp.get_property_number("video-rotate") * math.pi / 180 |
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))