install packages first:
yay -S xl2tpd strongswan networkmanager-l2tpref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
install packages first:
yay -S xl2tpd strongswan networkmanager-l2tpref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
| #!/bin/bash | |
| ## macOS 'Messages.app' attachments clean-up | |
| ## Main known media formats files will be moved to trash to save space | |
| ## Copyleft (C) 2018-2019 dzogrim | |
| ## dzogrim < dzogrim [@] dzogrim [.] pw > | |
| #VERSION="1.0 (2018-04-07)" # initial | |
| #VERSION="1.1 (2018-05-28)" # sort garbage |
| CREATE SEQUENCE public.global_id_seq; | |
| ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
| CREATE OR REPLACE FUNCTION public.id_generator() | |
| RETURNS bigint | |
| LANGUAGE 'plpgsql' | |
| AS $BODY$ | |
| DECLARE | |
| our_epoch bigint := 1314220021721; | |
| seq_id bigint; |
| public struct ISOString { | |
| /// Parse ISO 6709 string. | |
| /// e.g. "+34.0595-118.4460+091.541/" | |
| /// SeeAlso: [ISO 6709](https://en.wikipedia.org/wiki/ISO_6709) | |
| public static func parse(iso6709 text: String?) -> CLLocation? { | |
| guard | |
| let results = text?.capture(pattern: "([+-][0-9.]+)([+-][0-9.]+)"), | |
| let latitude = results[safe: 1] as NSString?, | |
| let longitude = results[safe: 2] as NSString? | |
| else { return nil } |
| extension Locale { | |
| /// Returns an SF Symbol currency image that match's the device's current locale, for instance dollar in North America, Indian rupee in India, etc. | |
| func currencySFSymbol(filled: Bool, withConfiguration configuration: UIImage.Configuration? = nil) -> UIImage { | |
| // Default currency symbol will be the Animal Crossing Leaf coin to remain impartial to any specific country | |
| let defaultSymbol = UIImage(systemName: "leaf.circle\(filled ? ".fill" : "")")! | |
| guard let currencySymbolName = currencySymbolNameForSFSymbols() else { return defaultSymbol } | |
| let systemName = "\(currencySymbolName).circle\(filled ? ".fill" : "")" | |
| return UIImage(systemName: systemName, withConfiguration: configuration) ?? defaultSymbol |