Unfortunately [xinput-calibrator
][1] does not work at all for calibrating a
touchscreen in Debian9. This is apparently because X server now uses libinput
to handle input devices instead of evdev. I spent huge amount of trying to
fiddling with xinput-calibrator
and 99-calibration.conf
files until I finely
found this [issue][2] on GitHub that gave me some hints as how to proceed. This
is mostly for my own reference, but I hope it might also help others in the same
situation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import CoreMediaIO | |
let CMIOExtensionPropertyCustomPropertyData_just: CMIOExtensionProperty = CMIOExtensionProperty(rawValue: "4cc_just_glob_0000") | |
let CMIOExtensionPropertyCustomPropertyData_dust: CMIOExtensionProperty = CMIOExtensionProperty(rawValue: "4cc_dust_glob_0000") | |
... | |
class cameraStreamSource: NSObject, CMIOExtensionStreamSource { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//recursive method to create deep copy | |
function deepCopy(obj) { | |
if (null === obj || 'object' !== typeof obj) return obj; | |
switch (obj.constructor) { | |
case Boolean: | |
return new Boolean(obj); | |
case Number: | |
return new Number(obj); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const APP = { | |
SW: null, | |
init() { | |
//called after DOMContentLoaded | |
//register our service worker | |
APP.registerSW(); | |
document | |
.getElementById('colorForm') | |
.addEventListener('submit', APP.saveColor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget to add to the project: | |
// 1. DeepLabV3 - https://developer.apple.com/machine-learning/models/ | |
// 2. CoreMLHelpers - https://github.com/hollance/CoreMLHelpers | |
enum RemoveBackroundResult { | |
case background | |
case finalImage | |
} | |
extension UIImage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/e9ed319226c6da30dd633725e48a97b0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSWindow+Fade.swift | |
// BH Bezel Notification | |
// | |
// Created by Ben Leggiero on 2017-11-09. | |
// Translated to Swift 4 from the original (ObjC): https://gist.github.com/indragiek/1397050 | |
// Copyright © 2017 Ben Leggiero. All rights reserved. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This version uses September 2017 august stretch image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WebKit | |
import UIKit | |
class WebViewController: UIViewController { | |
var url: URL! | |
var wKWebView: WKWebView! | |
@IBOutlet weak var containerView: UIView! | |
@IBOutlet weak var goBackButton: UIBarButtonItem! | |
@IBOutlet weak var goForwardButton: UIBarButtonItem! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public struct IdentityAndTrust { | |
public var identityRef:SecIdentity | |
public var trust:SecTrust | |
public var certArray:NSArray | |
} | |
public func extractIdentity(certData:NSData, certPassword:String) -> IdentityAndTrust { | |
NewerOlder