Skip to content

Instantly share code, notes, and snippets.

@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nickbutcher
nickbutcher / timestamp.sh
Created April 3, 2017 11:31
A script for setting creation and modification dates on all files within a folder. Specify the first date in the script then all files are stamped in alphabetical order, increasing by 1s.
USAGE="Set the desired date/time in the script and then call: timestamp /path/to/folder"
DATE="022109002017" # month day hour min year
if (( $# != 1 )); then
echo "Illegal parameters"
echo $USAGE
exit 2
fi
if [ ! -d $1 ]; then
@beesandbombs
beesandbombs / slicedCube.pde
Created April 30, 2018 20:52
sliced cube
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@niespodd
niespodd / package.json
Last active May 8, 2023 09:07
Making web3/bitcore-lib work with Angular 6-11 and >=11
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
import { Injectable } from '@angular/core';
import * as firebase from 'firebase/app';
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from 'angularfire2/firestore';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/take';
import 'rxjs/add/operator/toPromise';
import 'rxjs/add/operator/switchMap';
package com.squareup.leakcanary
import android.app.Application
import com.bugsnag.android.Client
import com.bugsnag.android.MetaData
import com.bugsnag.android.Severity.ERROR
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.FAILURE
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.LEAK
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.NOT_FOUND
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.WONT_FIX_LEAK
Moved to https://google.github.io/accompanist/insets/