most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
CIAdditionCompositing - Adds color components to achieve a brightening effect. This filter is typically used to add highlights and lens flare effects. | |
CIAffineClamp - Performs an affine transform on a source image and then clamps the pixels at the edge of the transformed image, extending them outwards. This filter performs similarly to the CIAffineTransform filter except that it produces an image with infinite extent. You can use this filter when you need to blur an image but you want to avoid a soft, black fringe along the edges. | |
CIAffineTile - Applies an affine transform to an image and then tiles the transformed image. | |
CIAffineTransform - Applies an affine transform to an image. You can scale, translate, or rotate the input image. You can also apply a combination of these operations. | |
CIAreaAverage - Calculates the average color for the specified area in an image, returning the result in a pixel. | |
CIAreaHistogram - Calculates a histogram for the specified area in an image, returning the result in a 1D image. |
#Every Single Option Under The Sun
#!/bin/bash | |
# | |
# Faster toolchain build: skips as much as possible. | |
# | |
# To use this toolchain from the command line:" | |
# export TOOLCHAINS=$(whoami) | |
# | |
# we build to the same prefix every time (instead of building | |
# to a versioned prefix) because every time the prefix changes | |
# *everything* rebuilds. |
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
listen_addresses = '*' | |
# Tuning at: https://pgtune.leopard.in.ua/ | |
# DB Version: 9.6 | |
# OS Type: linux | |
# DB Type: dw | |
# Total Memory (RAM): 16 GB | |
# CPUs num: 20 | |
# Connections num: 100 | |
# Hard drive type: ssd |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
import CoreGraphics | |
import Accelerate | |
import CoreImage | |
import UIKit | |
extension CGImage { | |
public enum Error: Swift.Error { | |
case imageResizingFailed | |
case cgContextCreationFailed |
NGINX is the world’s number one API gateway, delivering the vast majority of today’s API traffic, deployed as standalone gateways or embedded in API management products. This workshop is about deploying NGINX as a lightweight API gateway in a way that supports long-term maintenance and can be automated with common DevOps tooling.
In this hands-on workshop, you will configure NGINX to perform the common API gateway functions of request routing, rate limiting, and authentication for multiple APIs. We will also touch on advanced use cases such as HTTP method enforcement, and JSON validation.
Previous experience of NGINX is valuable, but not essential. Technical requirements:
#!/bin/bash | |
#!/bin/zsh | |
# by joevt May 24/2023 | |
#========================================================================================= | |
edid_decode=edid-decode | |
#========================================================================================= | |
# Modify EDID |