Skip to content

Instantly share code, notes, and snippets.

View dcampogiani's full-sized avatar
🌴
On vacation

Daniele Campogiani dcampogiani

🌴
On vacation
View GitHub Profile
@Composable
fun SpringAnimation() {
val scope = rememberCoroutineScope()
val offset = remember { Animatable(Offset(0f, 0f), Offset.VectorConverter) }
val offset2 = remember { Animatable(Offset(0f, 0f), Offset.VectorConverter) }
@sofakingforever
sofakingforever / AnimatedStarsView.kt
Last active February 3, 2022 09:21
Draw animated stars on Android view canvas - written in Kotlin - crafted with ❤️ by sofakingforever
package com.sofaking.moonworshipper.view
import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import java.util.*
import java.util.concurrent.Executors
@maltebucksch
maltebucksch / DeveloperTeamTest.kt
Last active August 19, 2022 18:32
Evaluating a great developer team
fun testTeamIsAwesome() {
val quickBirdTeamMembers = fetchTeamMembers()
val awesomeTeamMembers = quickBirdTeamMembers.filter { teamMember ->
teamMember.isPassionate &&
teamMember.isFriendly &&
teamMember.isConstantlyImproving
}
assertEquals(quickBirdTeamMembers.size, awesomeTeamMembers.size)
package loginapp.app
import loginapp.views.LoginScreen
import tornadofx.App
class LoginApp : App(LoginScreen::class)
@SandroMachado
SandroMachado / convert-to-webp.sh
Last active January 13, 2021 01:11
Script to convert all the `JPEG` images to the `WEBP` format in your Android project
#/bin/sh
# Inpiration: http://engineeringblog.yelp.com/2016/05/yelp-android-app-went-on-a-diet.html
# `-lossless` not used to give support for Android 4.0+
# Make sure cwebp is installed.
if ! type "cwebp" > /dev/null; then
echo "Please install cwebp to continue:"
echo "brew install webp"
exit 1
fi
@nvgrw
nvgrw / TP_Mac_Setup.markdown
Last active February 15, 2024 05:09
TurboPascal setup tutorial for Mac

TurboPascal on Mac

Note: probably 99% of this tutorial (excluding installation and folder structure) is DOSBox- and not Mac-specific. As long as your computer can run DOSBox you should be able to convert the steps to work on Windows.

1. Downloading & Installing DOSBox

DOS apps don't run natively on OS X, so we use DOSBox to emulate DOS for us.

1a. Downloading DOSBox

Navigate to the official DOSBox download page

@kbingman
kbingman / google.feature
Last active August 5, 2019 16:51
A basic test runner to use Yadda with the Nightwatch selenium testing framework.
Feature: Google Demo
Scenario: Google home page
When I open http://google.com
and I should see #viewport
@passsy
passsy / BasicNetwork.java
Created July 8, 2013 09:52
BasicNetwork fix for Volley with fallback to Cache if the device is offline
/*
* Copyright (C) 2011 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