Skip to content

Instantly share code, notes, and snippets.

@JamesPaden
JamesPaden / reverse-proxy.php
Last active November 30, 2021 17:54
Wordpress Reverse Proxy Plugin
<?php
/**
* @package Reverse Proxy
*/
/*
Plugin Name: Reverse Proxy
Plugin URI: https://instrumentalapp.com/
Description: Reverse proxy setup for Instrumental blog
Version: 1.0
Author: James Paden
@clementgenzmer
clementgenzmer / FBAnimationPerformanceTracker.h
Last active September 18, 2023 23:02
FBAnimationPerformanceTracker
/*
* This is an example provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@larahogan
larahogan / app-perf.md
Last active May 7, 2021 01:18
Native app performance metrics

Native app performance metrics

This is a draft list of what we're thinking about measuring in Etsy's native apps.

Currently we're looking at how to measure these things with Espresso and Kif (or if each metric is even possible to measure in an automated way). We'd like to build internal dashboards and alerts around regressions in these metrics using automated tests. In the future, we'll want to measure most of these things with RUM too.

Overall app metrics

  • App launch time - how long does it take between tapping the icon and being able to interact with the app?
  • Time to complete critical flows - using automated testing, how long does it take a user to finish the checkout flow, etc.?
  • Battery usage, including radio usage and GPS usage
  • Peak memory allocation
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@koenbok
koenbok / qc-framer.js
Created May 14, 2014 15:04
QC Spring Value Converter
var QcValueConverter = {
tensionFromQcValue: function(qcValue) {
return (qcValue - 30.0) * 3.62 + 194.0;
},
qcValueFromTension: function(tension) {
return (tension - 194.0) / 3.62 + 30.0;
},
frictionFromQcValue: function(qcValue) {
@jverkoey
jverkoey / shouldAutorotate_nonintrusive.m
Last active August 29, 2015 13:57
Implementing UINavigationController/UITabBarController support for shouldAutorotate without subclassing or extending.
// Add this to your app delegate.
// Neither `UINavigationController` nor `UITabBarController` have the slightest decency to ask their
// visible view controller whether IT would like to rotate and just go on and do whatever the hell
// they please. This'll show 'em.
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
UIViewController* topViewController = window.rootViewController;
do {
// Navigate modal controllers.
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@jwalton
jwalton / FlyingWidgets.md
Last active October 13, 2022 07:03
CSS3 Transitions for Dashing Dashboards

Flying Widgets adds CSS3 transitions to your dashboard, allowing you to cycle through multiple widget sets on a single TV without page reloads, using stylish CSS3 transitions. You can even still re-order your widgets and save their locations!

Note that sinatra-cyclist is a potential alternative if the machine you use to display your dashboards is lacking in graphics horsepower.

To use, put this file in assets/javascripts/cycleDashboard.coffee. Then find this line in application.coffee:

    $('.gridster ul:first').gridster
@lacostej
lacostej / application_loader.scpt
Created October 10, 2012 20:16
Script Application loader to send a bundle (draft)
#!/usr/bin/osascript
# a applescript app to use Application Loader to send the specified bundle to the first eligible
# application in state waiting for upload to use carefully :)
# contains a few delays because of VNC incurred delays
on run argv
set filepath to item 1 of argv
activate application "Application Loader"
tell application "System Events"
@mwbrooks
mwbrooks / style.css
Created February 23, 2011 18:50
Remove Tap Highlight from Mobile Webkit
* {
-webkit-touch-callout:none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust:none; /* prevent webkit from resizing text to fit */
-webkit-tap-highlight-color:rgba(0,0,0,0); /* prevent tap highlight color / shadow */
-webkit-user-select:none; /* prevent copy paste, to allow, change 'none' to 'text' */
}