Skip to content

Instantly share code, notes, and snippets.

View rock3r's full-sized avatar

Sebastiano Poggi rock3r

View GitHub Profile
@rock3r
rock3r / SpeechBubbleShape.kt
Created August 25, 2021 18:04
Bubble shape — the hard way, because why not.
internal class SpeechBubbleShape(
private val cornerRadius: Dp,
@Px private val stemPosition: Float,
private val stemSize: Dp
) : Shape {
private val bubblePath = Path()
override fun createOutline(
size: Size,
@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile
@rock3r
rock3r / terms.md
Created May 5, 2022 09:30
Demo/sample app privacy policy and terms (Sebastiano Poggi)

Privacy policy

This app does not collect, store nor transmit any personal data about its users.

Terms of use

The app is provided "as is", without any guarantees nor promises, including about its functionality and its safety. By using this app, you acknowledge you're doing so at your own risk.

@rock3r
rock3r / terms.md
Created May 5, 2022 10:11
Squanchy app privacy policy and terms

Privacy Policy

Squanchy Developers built the Squanchy app as an Open Source app. This SERVICE is provided by Squanchy Developers at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Squanchy unless otherwise defined in this Privacy Policy.

@rock3r
rock3r / myalbum_downloader.py
Created October 11, 2022 18:38
A downloader for MyAlbum.com albums. YMMV.
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Sebastiano Poggi wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return.
* Inspired by https://github.com/Gertje823/myalbum-downloader (which is now broken)
* ----------------------------------------------------------------------------
*/
@rock3r
rock3r / rms.xml
Created May 23, 2022 15:01
rms — live template to insert/surround with "val ... by remember { mutableStateOf(...) }"
<template name="rms" value="val $name$ by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf($SELECTION$$END$) }" description="Remember mutableState" toReformat="false" toShortenFQNames="true">
<variable name="name" expression="kotlinSuggestVariableName()" defaultValue="name" alwaysStopAt="true" />
<context>
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
@rock3r
rock3r / normalizeColorHex.kts
Last active February 7, 2023 17:53
A Kotlin script to normalize hex colour representations ("#RGB", "#ARGB", "#RRGGBB", "#AARRGGBB") into "#AARRGGBB", useful for when you're trying to find all unique colours in your app
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Sebastiano Poggi wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Seb
* ----------------------------------------------------------------------------
* Feel free to attribute this code in compiled products if you feel like it,
* but it's not required.
*/
@rock3r
rock3r / MainActivity.kt
Created June 16, 2022 16:13
WebView Compose scroll example
package dev.sebastiano.webviewcompose
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
@rock3r
rock3r / privacy-policy.md
Created June 14, 2023 18:23
Weeeeeee privacy policy

Weeeeee(th the Italians) privacy policy

We don't collect any user data, period.

@rock3r
rock3r / gw-update.sh
Last active June 30, 2023 01:27
Simple script to update Gradle from the command line (*NIX)
#!/bin/sh
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
#### SETUP/USAGE INSTRUCTIONS ####