Skip to content

Instantly share code, notes, and snippets.

View rcd27's full-sized avatar
🎯
Focusing

Stanislav Zemlyakov rcd27

🎯
Focusing
  • Russian Federation
View GitHub Profile
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.VectorConverter
import androidx.compose.animation.core.spring
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.gestures.awaitFirstDown
import androidx.compose.foundation.gestures.forEachGesture
@alexjlockwood
alexjlockwood / CircleSquareView.kt
Created April 8, 2019 05:59
Inspired by @beesandbombs (twitter.com/beesandbombs)
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View
import kotlin.math.cos
import kotlin.math.sin
import kotlin.math.sqrt
@alexjlockwood
alexjlockwood / WaveSquare.kt
Created March 11, 2019 02:30
Kotlin implementation of a wave square animation, inspired by https://twitter.com/beesandbombs/status/1101169015299420163
import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Path
import android.util.AttributeSet
import android.view.View
import kotlin.math.atan2
import kotlin.math.cos
import kotlin.math.sin
import kotlin.math.sqrt
@berak
berak / east_dnn.java
Last active October 4, 2023 04:56
east text detection, java flavour (@Zappyford, corrected)
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Core;
import org.opencv.core.*;
import org.opencv.core.MatOfFloat;
import org.opencv.core.MatOfByte;
import org.opencv.core.Scalar;
@JorgeCastilloPrz
JorgeCastilloPrz / PolymorphicProgram.kt
Last active May 23, 2020 08:16
PolymorphicProgram.kt
package me.jorgecastillo.polymorphicapps.polymorphic
import arrow.Kind
import arrow.core.Option
import arrow.core.left
import arrow.core.right
import arrow.effects.IO
import arrow.effects.async
import arrow.effects.fix
import arrow.effects.typeclasses.Async
@peschee
peschee / git_ssl_self_signed.md
Last active April 24, 2024 16:41
Disable SSL verification in git repositories with self-signed certificates

Sometimes, we have to access git repositories over SSL and the server only provides a self-signed certificate 🙈. Although there are ways to increase the trust level for the self-signed certificate (https://confluence.atlassian.com/fishkb/unable-to-clone-git-repository-due-to-self-signed-certificate-376838977.html, https://confluence.atlassian.com/bitbucketserverkb/resolving-ssl-self-signed-certificate-errors-806029899.html), my recommendation is to just ignore SSL verification alltogether.

Prepend GIT_SSL_NO_VERIFY=true before every git command run to skip SSL verification. This is particularly useful if you haven't checked out the repository yet.

Run git config http.sslVerify false to disable SSL verification if you're working with a checked out repository already.

@lopspower
lopspower / README.md
Last active May 7, 2024 23:40
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@lopspower
lopspower / README.md
Last active May 6, 2024 07:47
Material Animations

Material Animations

Android Arsenal

[Android Transition Framework][transition-framework] can be used for three main things:

  1. Animate activity layout content when transitioning from one activity to another.
  2. Animate shared elements (Hero views) in transitions between activities.
  3. Animate view changes within same activity.
@mkweskin
mkweskin / gist:9214338
Created February 25, 2014 18:03
Git clone with no cert check
env GIT_SSL_NO_VERIFY=true git clone https://...
@chrishuan9
chrishuan9 / Hex2StringMain.java
Created April 17, 2012 20:47
Convert String to Hex and Hex to String
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author EtaYuy88
*/
public class Main {