Skip to content

Instantly share code, notes, and snippets.

@timglorioso
timglorioso / curvy.txt
Created May 28, 2019 08:15
the best animation curve of all time
cubic-bezier(0.075, 0.82, 0.165, 1)
@timglorioso
timglorioso / FocusButton.js
Last active January 11, 2019 16:17
A button for React with consistent focus behavior across browsers / OS's
import React from 'react'
// Disturbingly enough, `div` elements have better cross-browser compatibility
// than `button` elements in terms of receiving focus events. As of this
// writing Chrome is the only browser for macOS that focuses `button` elements
// on click, which is a useful feature for displaying contextual controls
// based on focus and blur events. Amazing that Windows actually got something
// right, right?
//
// Note: I also tested manually focusing `button` elements `onClick`, and on
@timglorioso
timglorioso / git.md
Last active May 17, 2021 19:36
git cheatsheet

Sync your fork with upstream changes. Assumes upstream is a remote with URLs configured.

git fetch upstream
git rebase upstream/<upstream-branch>
git push

Sync your local repository with remote changes. Will rewrite your local history via --rebase.

git pull --rebase <remote> <branch>
@timglorioso
timglorioso / bs2.txt
Created December 7, 2017 22:29
Verifying my Blockstack ID is secured with the address 1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE https://explorer.blockstack.org/address/1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE
Verifying my Blockstack ID is secured with the address 1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE https://explorer.blockstack.org/address/1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE
@timglorioso
timglorioso / bs.txt
Created December 7, 2017 22:26
Verifying my Blockstack ID is secured with the address 1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE https://explorer.blockstack.org/address/1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE
Verifying my Blockstack ID is secured with the address 1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE https://explorer.blockstack.org/address/1BiznNnAAnxmku6a4ZGhBXWScEoy9oJRDE
@timglorioso
timglorioso / FindSubviewsByClass.swift
Created March 27, 2016 18:10
a UIView extension to find subviews by class in Swift
/* Written with the help of these Objective-C resources:
* http://www.jayway.com/2009/02/24/finding-subview-of-a-particular-class-in-cocoa/
* http://www.glimsoft.com/01/07/how-to-inspect-subviews-hierarchy-of-any-uiview/
*/
import UIKit
extension UIView {
/* This helper method tries to find a subview of the given class. It returns