Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Butcher nickbutcher

View GitHub Profile
@nickbutcher
nickbutcher / timestamp.sh
Created Apr 3, 2017
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.
View timestamp.sh
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
View MainActivity.kt
/*
* Copyright 2017 Google Inc. All rights reserved.
*
* 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 / svgo.json
Last active Apr 12, 2020
A customized SVGO (https://github.com/svg/svgo) config for use with the Sketch SVGO Compressor plugin (https://github.com/BohemianCoding/svgo-compressor).
View svgo.json
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": true,
"indent": 2,
"floatPrecision": 3,
"plugins": [
{
"name": "removeDoctype",
"enabled": true
},
@nickbutcher
nickbutcher / avd_loading_bar.xml
Last active Sep 21, 2020
A prototype of a loading indicator utilizing repeated gradients. See https://twitter.com/crafty/status/914830571196571648
View avd_loading_bar.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
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 distributed under the License
@nickbutcher
nickbutcher / MainActivity.kt
Last active Jan 9, 2021
Demonstrating how to tile a (Vector) Drawable
View MainActivity.kt
/*
* 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 distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@nickbutcher
nickbutcher / GradientMap.kt
Last active Feb 7, 2018
A prototype implementation of gradient mapping (https://bjango.com/articles/gradientmaps/) on Android.
View GradientMap.kt
/*
* 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 distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@nickbutcher
nickbutcher / MainActivity.java
Created Oct 31, 2017 — forked from chornbec/MainActivity.java
Getting issue with BodyMovin on Android Studio
View MainActivity.java
package com.example.myapplication2;
import android.graphics.drawable.Animatable
import android.graphics.drawable.Drawable
import android.widget.ImageView;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@nickbutcher
nickbutcher / AndroidManifest.xml
Last active Nov 13, 2017
Demonstrating techniques for supporting wide color gamut rendering.
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 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 distributed under the License
@nickbutcher
nickbutcher / IconView.kt
Last active Aug 2, 2021
A prototype implementation of a shadow effect inspired by the Google Play Games app (https://play.google.com/store/apps/details?id=com.google.android.play.games).
View IconView.kt
/*
* 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 distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
View LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.