Skip to content

Instantly share code, notes, and snippets.

@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@OSemenovBoyarka
OSemenovBoyarka / AndroidEmulatorFastfile
Created March 28, 2017 09:05
Couple methods to launch required android emulator using fastlane
# Set of lanes for control android emulators
require 'open3'
platform :android do
# time in seconds, to wait until emulator will finish launching
emulator_launch_timeout = 600 # 10 mins should be more, than enough for any relevant configuration
desc "Starts needed emulator, given though 'device_name' option, kills all others and deletes all redundant apks"
private_lane :prepare_emulator do |options|
device_name = options[:device_name]
@MarkusKramer
MarkusKramer / Base64.kt
Last active June 3, 2024 17:25
Kotlin Multiplatform Base64 - no extra dependencies. Based on Java's implementation.
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*