Skip to content

Instantly share code, notes, and snippets.

@james-d
james-d / AnimatedPropertiesTest.java
Created January 17, 2014 15:08
Some simple examples of animations with a Button
import java.util.concurrent.Callable;
import javafx.animation.Animation;
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.RotateTransition;
import javafx.animation.Timeline;
import javafx.application.Application;
/*
* Copyright (C) 2017 The Android Open Source Project
*
* 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
@marcandreappel
marcandreappel / Android auto increment build number
Created June 11, 2018 14:54
Android Studio auto increment build number for version code
# First create the file version.properties with value VERSION_BUILD=0
# In app/build.gradle:
android {
def versionPropsFile = file('version.properties')
def versionBuild
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
@Col-E
Col-E / SmoothishScrollpane.java
Created June 24, 2018 23:59
JavaFX ScrollPane with smooth scrolling
import javafx.animation.Animation.Status;
import javafx.animation.Interpolator;
import javafx.animation.Transition;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.control.ScrollPane;
import javafx.scene.input.ScrollEvent;
import javafx.scene.layout.VBox;
import javafx.util.Duration;
@andrew-raphael-lukasik
andrew-raphael-lukasik / .UIDocumentLocalization.cs.md
Last active July 10, 2024 00:57
Text localization script for UIDocument (UI Toolkit @ Unity)

pattern to follow

// NOTE: this class assumes that you designate StringTable keys in label fields (as seen in Label, Button, etc) // and start them all with '#' char (so other labels will be left be)

@jam53
jam53 / CalculatingYouTubeWatchTime.md
Last active October 5, 2023 18:43
A concise guide that outlines the process of calculating ones total watch time on YouTube

Calculating YouTube watch time

Prerequisites

YouTube watch history

Request a copy of your YouTube watch history over at Google Takeout

  • Click on Deselect all
  • Scroll down and select YouTube and YouTube Music
  • Click on All YouTube data included
  • Make sure to only select history