Skip to content

Instantly share code, notes, and snippets.

View nimi0112's full-sized avatar
🎯
Focusing

Nimish Nandwana nimi0112

🎯
Focusing
View GitHub Profile
@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
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 androidx.annotation.ColorInt
import java.lang.Math.pow
import kotlin.math.cos
@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
@DanielJette
DanielJette / show_lang.sh
Created May 26, 2019 20:55
Simple script to count java and kotlin files in a project
#!/bin/sh
if [ -z "$1" ]; then
echo "Please specify a project"
echo " e.g. show_lang.sh Polaris/Core"
exit 1
fi
BASEDIR=$(dirname "$0")
@jkotchoff
jkotchoff / bitrise.yml
Created April 12, 2020 04:45
Bitrise CI slack workflow
...
workflows:
primary:
steps:
- activate-ssh-key@4.0.3:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.17: {}
- script@1.1.5:
inputs:
- content: |-
@jinnosux
jinnosux / timeago.dart
Created November 7, 2020 15:32
Flutter time ago implementation
String timeAgoSinceDate({bool numericDates = true}) {
DateTime date = this.createdTime.toLocal();
final date2 = DateTime.now().toLocal();
final difference = date2.difference(date);
if (difference.inSeconds < 5) {
return 'Just now';
} else if (difference.inSeconds < 60) {
return '${difference.inSeconds} seconds ago';
} else if (difference.inMinutes <= 1) {
@ccfiel
ccfiel / change_public.py
Created November 9, 2020 05:32
Change permission FreshchatSDK.h in iOS
import uuid
import os
#Tags
FILE_REF_SECTION = "PBXFileReference section"
PACKAGE_HEADER_REF_SECTION = "PBXNativeTarget section"
PACKAGE_HEADER_DEFINITION = "PBXHeadersBuildPhase section"
PUBLIC_HEADER_DEFINITION = "PBXBuildFile section */"
#Constants