For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
{ | |
"卧": "臣卜", | |
"项": "工页", | |
"功": "工力", | |
"攻": "工攵", | |
"荆": "茾刂", | |
"邪": "牙阝", | |
"雅": "牙隹", | |
"期": "其月", | |
"欺": "其欠", |
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class Responder: NSObject { | |
@objc func segmentedControlValueChanged(_ sender: UISegmentedControl) { | |
UIView.animate(withDuration: 0.3) { | |
buttonBar.frame.origin.x = (segmentedControl.frame.width / CGFloat(segmentedControl.numberOfSegments)) * CGFloat(segmentedControl.selectedSegmentIndex) | |
} |
import Foundation | |
import UIKit | |
import ImageIO | |
import MobileCoreServices | |
extension UIImage { | |
static func animatedGif(from images: [UIImage]) { | |
let fileProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: 0]] as CFDictionary | |
let frameProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [(kCGImagePropertyGIFDelayTime as String): 1.0]] as CFDictionary | |
// | |
// GIF2MP4.swift | |
// | |
// Created by PowHu Yang on 2020/4/24. | |
// Copyright © 2020 PowHu Yang. All rights reserved. | |
// | |
/* How to use | |
let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!) | |
let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4") |
extension UIView { | |
func startShimmering(){ | |
let light = UIColor.white.cgColor | |
let alpha = UIColor.white.withAlphaComponent(0.7).cgColor | |
let gradient = CAGradientLayer() | |
gradient.colors = [alpha, light, alpha, alpha, light, alpha] | |
gradient.frame = CGRect(x: -self.bounds.size.width, y: 0, width: 3 * self.bounds.size.width, height: self.bounds.size.height) | |
gradient.startPoint = CGPoint(x: 0.0, y: 0.5) |
import Cocoa | |
struct ImageConstants { | |
static let gifDelayTime: NSNumber = 2 | |
static let gifLoopCount:NSNumber = 10 | |
} | |
extension NSImage { | |
//swift 2.0 translation/adaptation from https://gist.github.com/akisute/1141953 |
#!/usr/bin/env python | |
''' | |
_______ ______ | |
|_ _\ \ / / ___| | |
| | \ \ / /\___ \ | |
| | \ V / ___) | | |
|_| \_/ |____/ | |
Teske Virtual System |