Skip to content

Instantly share code, notes, and snippets.

@nekonora
nekonora / AnimationSyncToKeyboard.swift
Last active July 14, 2022 04:46
Sync animation to keyboard appearing
@objc func keyboardWillShow(_ notification: NSNotification) {
let keyboardAnimationDetail = notification.userInfo
let animationCurve: Int = {
if let keyboardAnimationCurve = keyboardAnimationDetail?[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int {
let curve: Int? = UIView.AnimationCurve(rawValue: keyboardAnimationCurve)?.rawValue
return curve ?? 0
} else {
return 0
}
@rafaeltuelho
rafaeltuelho / install-gosu-centos.md
Last active February 23, 2022 04:56
installing gosu on a centos docker box
# Install gosu.  https://github.com/tianon/gosu
ENV GOSU_VERSION=1.11
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \
    && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64.asc" \
    && gpg --verify /usr/local/bin/gosu.asc \
    && rm /usr/local/bin/gosu.asc \
    && rm -r /root/.gnupg/ \
 && chmod +x /usr/local/bin/gosu \