This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
workflows: | |
primary: | |
steps: | |
- [email protected]: | |
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' | |
- [email protected]: {} | |
- [email protected]: | |
inputs: | |
- content: |- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.util.AttributeSet | |
import android.view.View | |
private const val N = 16 | |
private const val PERIOD1 = -10000.0 | |
private const val PERIOD2 = -500.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static String timeAgoSinceDate(String dateString, {bool numericDates = true}) { | |
DateTime date = DateTime.parse(dateString); | |
final date2 = DateTime.now(); | |
final difference = date2.difference(date); | |
if ((difference.inDays / 365).floor() >= 2) { | |
return '${(difference.inDays / 365).floor()} years ago'; | |
} else if ((difference.inDays / 365).floor() >= 1) { | |
return (numericDates) ? '1 year ago' : 'Last year'; | |
} else if ((difference.inDays / 30).floor() >= 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Morse | |
def posibilities(signals) | |
signals.include?('?') ? check_wildcard(signals) : morses["#{signals}"] | |
end | |
def check_wildcard(signals) | |
length = signals.split('').length | |
values = [] | |
if length.eql?(1) | |
values = ["E", "T"] |
NewerOlder