Skip to content

Instantly share code, notes, and snippets.

View Ttiki's full-sized avatar
🎓
Finishing my Master degree

Clément Combier Ttiki

🎓
Finishing my Master degree
View GitHub Profile
@Ttiki
Ttiki / battery-background-img-changer.txt
Created February 25, 2022 18:30
A shader wich fades between two images depending on your battery level. This shader is to be used inside the Android app "Shader Editor". Read the top comments for explanation on how to set-up it inside the app.
//Author: (Lord) Clément 'Ttiki' Combier
//License: MIT License Copyright (c) 2022 Clément Combier
//This shader was created on/for the Android app : Shader Editor
//To use this shader, load two images (three dots menu > Add uniform/texture > Sample2D tab > + button, add your image)
//Now, you need to give your images a name. For your first image (the one which will be displayed when your battery is at 100%), put "img1".
//For your second image, put img2.
//Set this shader as your wallpaper (available in the app inside the three dots menu)
//Shader Editor can be found on the Google Play Store here: https://play.google.com/store/apps/details?id=de.markusfisch.android.shadereditor
@Ttiki
Ttiki / MainActivity.kt
Created December 19, 2021 10:36
Android Life Cycle (Kotlin)
/*
* Copyright 2020, 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
@Ttiki
Ttiki / countdown.js
Created September 30, 2021 19:22
Countdown between a date and today's date
//THIS MAY NOT BE THE BEST POSSIBLE WAY TO DO
//THIS CODE IS OLD AND I DIDN'T LOOK INTO IT BEFORE POSTING
//I WILL CHECK AND UPDATE IT IF NECESSARY IN THE FUTURE
//THIS IS JSUT TO TEST GITHUB'S GIST.
// Set the date we're counting down to
var countDownDate = new Date("July 19, 2018 13:15:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {