Skip to content

Instantly share code, notes, and snippets.

@ericallam
ericallam / leak1.cs
Created September 2, 2020 10:00
UnityWebRequest DownloadTexture leak
using System;
using System.Collections.Generic;
using MEC;
using RSG;
using UnityEngine;
using UnityEngine.Networking;
// This is the original implementation
namespace DefaultNamespace
@ericallam
ericallam / gist:11214298
Created April 23, 2014 12:58
Fixing animation snapback without setDisableActions:YES
// Implements the solution for solving "snapback" found in
// Chapter 8 of "iOS Core Animation Advanced Techniques" by Nick Lockwood
// without the need to use setDisableActions: to override the implicit animation,
// instead passing in the implicit animation key in addAnimation:forKey:
// With setDisableActions
- (void)applyBasicAnimation:(CABasicAnimation *)animation toLayer:(CALayer *)layer
{
//set the from value (using presentation layer if available)
animation.fromValue = [layer.presentationLayer ?: layer valueForKeyPath:animation.keyPath];
@ericallam
ericallam / keybase.md
Created September 1, 2019 21:01
keybase.md

Keybase proof

I hereby claim:

  • I am ericallam on github.
  • I am eallam (https://keybase.io/eallam) on keybase.
  • I have a public key ASBmNg1iFy8fqoyVlxPpWUjlx_FQi7wvtp0phG5or9ijhAo

To claim this, I am signing this object:

2019-03-19 11:45:41 Using SAM Template at /Users/eric/code/Solve/opensource/ship-logs-to-honeycomb/template.yml
2019-03-19 11:45:41 Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
2019-03-19 11:45:41 Changing event name from before-call.apigateway to before-call.api-gateway
2019-03-19 11:45:41 Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2019-03-19 11:45:41 Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2019-03-19 11:45:41 Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2019-03-19 11:45:41 Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2019-03-19 11:45:41 Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.com
@ericallam
ericallam / schema.md
Created January 23, 2019 10:07
Example Schema
@ericallam
ericallam / AppComponent.js
Last active December 25, 2018 20:41
Getting React Native's Navigator and Relay to work together
import Relay, {
RootContainer,
Route
} from 'react-relay'
class SeasonRoute extends Route {
static paramDefinitions = {};
static queries = {
currentSeason: () => Relay.QL`query { currentSeason }`,
@ericallam
ericallam / AppDelegate.m
Created May 22, 2014 14:49
Interactive Animated Transition Example
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
{
"chain": "main",
"blocks": 0,
"headers": 16000,
"bestblockhash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"difficulty": 1,
"mediantime": 1231006505,
"verificationprogress": 3.715029412543562e-09,
"chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
"pruned": false,
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/
# This config should be placed in following path:
# ~/.bitcoin/bitcoin.conf
# [core]
# Specify a non-default location to store blockchain and other data.
datadir=/mnt/volume-lon1-03-part1/Bitcoin
# Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon machine's available RAM.
dbcache=1000
sudo parted /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 mklabel gpt
sudo parted -a opt /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 mkpart primary ext4 0% 100%
sudo mkfs.ext4 /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03-part1
sudo mkdir -p /mnt/volume-lon1-03-part1
echo '/dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03-part1 /mnt/volume-lon1-03-part1 ext4 defaults,nofail,discard 0 2' | sudo tee -a /etc/fstab
sudo mount -a
sudo chmod 777 /mnt/volume-lon1-03-part1