Skip to content

Instantly share code, notes, and snippets.

View rock3r's full-sized avatar

Sebastiano Poggi rock3r

View GitHub Profile
@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 / 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 / .gitignore
Last active April 13, 2024 12:52
A template .gitignore for Kotlin projects using Gradle (with additional content for Android projects)
## Seb's .gitignore template
# You can find the most up-to-date version at https://go.sebastiano.dev/gitignore
# Partly based on templates by https://plugins.jetbrains.com/plugin/7495--ignore
# Released under a CC-0 License https://creativecommons.org/share-your-work/public-domain/cc0/
### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
@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 / cleanup-rtf.sh
Created September 2, 2020 16:03
Remove background from RTF text (copied from IntelliJ/Android Studio) via a simple script [macOS only]
#!/bin/sh
# Remove background from RTF text (copied from IntelliJ/Android Studio/...)
# By Sebastiano Poggi, Apache 2.0 license: https://www.apache.org/licenses/LICENSE-2.0
#
# Text is altered in-place in the clipboard. If copying from an IDE, make sure you have the
# "Copy a text fragment" preference set to "Rich text" in the IDE preferences Editor > General.
#
# Also available as a Quick Action to easily install on macOS from here:
# https://www.dropbox.com/s/8qboebourj3jkzo/Copy%20for%20Keynote.workflow.zip?dl=1
@rock3r
rock3r / c2webp.kts
Created July 23, 2020 10:53
Kscript program to convert a sequence of images to a webp animation, using img2webp
#!/bin/bash
//usr/bin/env echo '
/**** BOOTSTRAP kscript ****\'>/dev/null
command -v kscript >/dev/null 2>&1 || curl -L "https://git.io/fpF1K" | bash 1>&2
exec kscript $0 "$@"
\*** IMPORTANT: Any code including imports and annotations must come after this line ***/
@file:DependsOn("com.github.ajalt:clikt:2.8.0")
@rock3r
rock3r / sebs-fancy-idea-editor-colour-scheme.icls
Last active January 28, 2020 15:20
Seb's Fancy Custom IJ IDEA/AS Hipster Colour Scheme — v1.0
<scheme name="Seb's Fancy Custom Hipster Colour Scheme v1.0" version="142" parent_scheme="Darcula">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2020-01-28T16:17:01</property>
<property name="ide">idea</property>
<property name="ideVersion">2020.1.0.0</property>
<property name="modified">2020-01-28T16:17:11</property>
<property name="originalScheme">Solarized Seeb</property>
</metaInfo>
<option name="LINE_SPACING" value="1.25" />
@rock3r
rock3r / findProjectGitRoot.kt
Created November 13, 2019 10:44
Extension property for Gradle's Project interface to figure out the Git root, if any
package dev.sebastiano.utils.gradle
import org.gradle.api.*
import java.io.*
// Note: you need to have a dependency on `gradleApi()` in your buildSrc project
val Project.gitRoot: File?
get() {
fun File.isGitRoot() = isDirectory && File(this, ".git").isDirectory
@rock3r
rock3r / build.gradle.kts
Created June 21, 2019 15:43
A Gradle Kotlin DSL task to enumerate the resolved Kotlin plugin version for all subprojects
tasks.register("kotlinPluginVersions") {
description = "Shows the resolved Kotlin plugin version for all subprojects"
group = "documentation"
doLast {
subprojects.forEach { subproject ->
System.err.println("****** Project ${subproject.name} plugins ******")
subproject.plugins.filterIsInstance<KotlinBasePluginWrapper>()
.forEach {
System.err.println("Kotlin plugin ${it.kotlinPluginVersion}")
}
package me.seebrock3r.util
/**
* Calls the specified function [block] as a side effect of a previous expression.
*
* This is similar to [run] in that it's used to chain side effects, but it
* doesn't return anything and the block doesn't have any parameters. If your
* side effects require either of those things, use [run] or [also] instead.
*
* @see run