Very simple convenience class to make working with Auto-Layout easier.
class Layout {
let views: [String:UIView]
let superview: UIView
| struct もじれつ: Printable { | |
| let description: String | |
| init(string: String) { | |
| var mutableString = NSMutableString(string: string) as CFMutableString | |
| if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 { | |
| self.description = mutableString as NSString | |
| } else { | |
| self.description = string | |
| } |
| func debounce( delay:NSTimeInterval, #queue:dispatch_queue_t, action: (()->()) ) -> ()->() { | |
| var lastFireTime:dispatch_time_t = 0 | |
| let dispatchDelay = Int64(delay * Double(NSEC_PER_SEC)) | |
| return { | |
| lastFireTime = dispatch_time(DISPATCH_TIME_NOW,0) | |
| dispatch_after( | |
| dispatch_time( | |
| DISPATCH_TIME_NOW, |
| #!/usr/bin/env ruby | |
| require 'aws-sdk' | |
| require 'logger' | |
| s3 = AWS::S3.new( | |
| access_key_id: '<ACCESS KEY>', | |
| secret_access_key: '<SECRET KEY>' | |
| ) | |
| logger = Logger.new('./s3_restores.log') |
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <Root PresetName="Custom"> | |
| <KeyboardLayout>en-US</KeyboardLayout> | |
| <MouseXMode Value="" /> | |
| <MouseXDecay Value="0" /> | |
| <MouseYMode Value="" /> | |
| <MouseYDecay Value="0" /> | |
| <MouseReset> | |
| <Primary Device="{NoDevice}" Key="" /> | |
| <Secondary Device="{NoDevice}" Key="" /> |
| #!/bin/bash | |
| ## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/ | |
| ## | |
| ## Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| ## software and associated documentation files (the "Software"), to deal in the Software | |
| ## without restriction, including without limitation the rights to use, copy, modify, | |
| ## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| ## permit persons to whom the Software is furnished to do so, subject to the following | |
| ## conditions: |
| Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file| | |
| certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
| config_dir = File.dirname(file) | |
| connection_name = nil | |
| new_config = [] | |
| File.read(file).lines.each do |line| | |
| line.strip! | |
| if line.start_with?('#viscosity name') |
| # This would go into .bash_profile, .bashrc, .zshrc, etc. | |
| # Script to start the gpg-agent - in it's own file as it is also used when the machine starts up | |
| # Be sure to update the path to wherever you place this file! | |
| # Note, depending on shell you may not need this line enabling, if the global daemon is already running | |
| # OK. Some shells complain, others don't! | |
| ~/bin/startup-gpg-agent.sh | |
| # GPG | |
| if [ -f "${HOME}/.gpg-agent-info" ]; then |
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |
| accentor | |
| adjutant | |
| albatross | |
| alethe | |
| anhinga | |
| ani | |
| antbird | |
| antpitta | |
| antshrike | |
| antthrush |