This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml
.
It runs daily to sync the default branch and can be triggered manually for any branch.
#!/bin/bash | |
set -oue pipefail | |
INFO='\033[0;36m' # Cyan for general information | |
SUCCESS='\033[0;32m' # Green for success messages | |
WARN='\033[0;33m' # Yellow for warnings | |
ERROR='\033[0;31m' # Red for errors | |
NC='\033[0m' # No Color | |
echo "This script will help you set up 1Password in a Flatpak browser." |
Not necessarily meant to be followed step by step, although it is recommended. Some steps are valid during all levels, others give way to better alternatives further on.
.onDrop(of: [.fileURL], isTargeted: nil) { providers in | |
if let loadableProvider = providers.first(where: { $0.canLoadObject(ofClass: URL.self) }) { | |
_ = loadableProvider.loadObject(ofClass: URL.self) { fileURL, _ in | |
if let fileURL = fileURL, fileURL.pathExtension.lowercased() == "zip" { | |
self.logger.info("Dropped \(fileURL.path)") | |
DispatchQueue.main.async { | |
importer.open(zipArchiveURL: fileURL) | |
} | |
} | |
} |
// | |
// VirtualKeyboard.swift | |
// MacBook Air M1 Zhuyin Keyboard | |
// Written with SwiftUI ~=300 LOC, < 4hrs | |
// Created by Ethan Huang on 2021/1/13. | |
// Twitter: @ethanhuang13 | |
import SwiftUI | |
struct VirtualKeyboard: View { |
#!/bin/sh /etc/rc.common | |
# OpenWrt /etc/init.d/ script to automatically add ipsets across reboots | |
# For more info about how to write init scripts https://openwrt.org/docs/techref/initscripts | |
# | |
# howto: | |
# - upload this file as /etc/init.d/autoipset | |
# - # chmod 755 /etc/init.d/autoipset | |
# - # /etc/init.d/autoipset enable | |
# - # /etc/init.d/autoipset start |
# /etc/sysctl.d/wireguard.conf | |
net.ipv4.ip_forward=1 | |
net.ipv6.conf.all.forwarding=1 | |
net.ipv6.conf.default.forwarding=1 | |
net.ipv6.conf.eth0.proxy_ndp=1 | |
#/etc/wireguard/wg0.conf (DO virtual machine) | |
[Interface] | |
# The server interface does not actually need an ipv6. | |
# The 2 following must be repeated for each used addres [0, 1] |
//Sourced from http://newosxbook.com/ent.jl?ent=&osVer=iOS13 | |
abs-client | |
absinthe-client | |
adi-client | |
allow-obliterate-device | |
allow-softwareupdated | |
appData | |
application-identifier | |
aps-connection-initiate | |
aps-environment |
rem to disable private dns | |
adb shell settings put global private_dns_mode off | |
rem to enable private dns with hostname (example with dns.adguard.com) | |
adb shell settings put global private_dns_mode hostname | |
adb shell settings put global private_dns_specifier dns.adguard.com |
@implementation UIImage (ResourceProxyHack) | |
+ (UIImage *)_iconForResourceProxy:(id)proxy format:(int)format { | |
// HACK: proxy seems garbage so we always show PDF for now. | |
let cgImage = [_bridge imageForFileType:@"pdf"]; | |
// HACK: We use mainScreen here but could have multiple screens. | |
let image = [UIImage imageWithCGImage:cgImage scale:UIScreen.mainScreen.scale orientation:UIImageOrientationUp]; | |
return image; | |
} |