Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).
See also:
#!/usr/bin/env bash
extension View { | |
func flexible(width: Bool, height: Bool) -> some View { | |
self.modifier(MatchingParentModifier(width: width, height: height)) | |
} | |
} | |
struct MatchingParentModifier: ViewModifier { | |
@State private var intrinsicSize: CGSize = UIScreen.main.bounds.size | |
private let intrinsicWidth: Bool | |
private let intrinsicHeight: Bool |
{ | |
"schemes" : | |
[ | |
{ | |
"background" : "#fafafa", | |
"black" : "#000000", | |
"blue" : "#3199e1", | |
"brightBlack" : "#686868", | |
"brightBlue" : "#399ee6", | |
"brightCyan" : "#4cbf99", |
#!/bin/bash | |
if ! which hxselect > /dev/null; then | |
echo You need hxselect and hxnormalize | |
echo Run this: sudo apt-get install html-xml-utils | |
exit 1 | |
fi | |
hxselect="hxselect -s \n -i" | |
hxnormalize="hxnormalize -l 10000000 -x " |
Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).
See also:
#!/usr/bin/env bash
Currently the Serverless framework only offers lifecycle events that are bound to commands and also are very coarse. Each core plugin only exposes the events that are defined by the framework. This is suboptimal for plugin authors as they want to hook special events within the deployment process.
The PR adds fine grained lifecycles to the AWS deployment process (see below for the current implementation process) and makes the package/deploy plugin implementation non-breaking.
Prior to Android 7, the system had a single preferred locale, and fallback behavior was quite rudimentary. Starting with Android 7, the user can now specify a priority list of locales, and fallback behavior is improved.
However, in many cases it is still surprisingly difficult to make full use of locale fallback, and there are some hidden gotchas when trying to fully support both Android 7 and earlier versions.
public class MainActivity extends Activity | |
// ... any code | |
/** | |
* Clear focus on touch outside for all EditText inputs. | |
*/ | |
@Override | |
public boolean dispatchTouchEvent(MotionEvent event) { | |
if (event.getAction() == MotionEvent.ACTION_DOWN) { | |
View v = getCurrentFocus(); |
<?php | |
// public/cliserver.php (router script) | |
if (php_sapi_name() !== 'cli-server') { | |
die('this is only for the php development server'); | |
} | |
if (is_file($_SERVER['DOCUMENT_ROOT'].'/'.$_SERVER['SCRIPT_NAME'])) { | |
// probably a static file... | |
return false; |
# script insstalls qemu and vagrant, then uses vagrant to build a qemu- | |
# supported rpi kernel for dev. | |
# - tested with 2015-02-16-raspbian-wheezy.zip on OSX El Capitan | |
# Variables | |
IMAGE=http://downloads.raspberrypi.org/raspbian_latest | |
IMG_PATH="/vagrant/raspbian_latest.img" | |
PI_LINUX=https://github.com/raspberrypi/linux | |
PI_LINUX_BRANCH="rpi-4.2.y" | |
PI_TOOLS=https://github.com/raspberrypi/tools |