Skip to content

Instantly share code, notes, and snippets.

View xaelkaz's full-sized avatar
🎯
Focusing

xaelkaz

🎯
Focusing
View GitHub Profile
build:
maxIssues: 0
excludeCorrectable: false
weights:
# complexity: 2
# LongParameterList: 1
# style: 1
# comments: 1
config:
var NoSunmiPrinter = 0
var CheckSunmiPrinter = 1
var FoundSunmiPrinter = 2
var LostSunmiPrinter = 3
private var sunmiPrinterService: SunmiPrinterService? = null
var sunmiPrinter: Int = CheckSunmiPrinter
private val innerPrinterCallback: InnerPrinterCallback = object : InnerPrinterCallback() {
p_uid = "6126"
u_uid = "4914"
start_date = (Time.now.beginning_of_day - 3.day)
end_date = (Time.now.end_of_day)
id = Invoice.where(user_uid: u_uid, cancelled: false, :invoiced_at => start_date..end_date).pluck(:id)
ivnoice_id = InvoiceItem.where(invoice_id: id, product_uid: p_uid).pluck(:invoice_id)
FROM ruby:2.5.3-alpine
ENV BUNDLER_VERSION=2.0.2
RUN apk add --update --no-cache \
binutils-gold \
build-base \
curl \
file \
g++ \
override suspend fun validateAndSendCreditCorpPayment(
paymentSecureKey: String,
amountToPayValue: String,
encryptData: String,
dbRef: String,
module: Module
): Result<CreditCardPaymentDTO> {
return try {
database.withTransaction {
// Validate credit card field
@xaelkaz
xaelkaz / user_repository.dart
Created February 21, 2020 20:42 — forked from funwithflutter/user_repository.dart
Flutter Web Firebase Auth
import 'package:firebase/firebase.dart';
import 'package:meta/meta.dart';
@immutable
class UserRepository {
UserRepository({Auth firebaseAuth, GoogleAuthProvider googleSignin})
: _firebaseAuth = firebaseAuth ?? auth(),
_googleSignIn = googleSignin ?? GoogleAuthProvider();
final Auth _firebaseAuth;
import android.content.Context
import android.content.res.Resources
import android.graphics.drawable.Drawable
import android.support.annotation.AnyRes
import android.support.v4.app.Fragment
import android.support.v4.content.res.ResourcesCompat.*
import android.view.View
val Context.animations
get() = ResourceMapper { resources.getAnimation(it) }
//WeatherAPI object
data class WeatherAPI(
val id: Long,
val humidity: Int,
val description: String,
val weatherId: Int,
val windDeg: Double,
val windSpeed: Double,
val temperature: Int
)
@xaelkaz
xaelkaz / AboutEnumsWithCompanionObj.kt
Created December 11, 2019 22:30 — forked from automationhacks/AboutEnumsWithCompanionObj.kt
Reverse lookup an enum constant by using a dedicated member method
package experiments
enum class MousesV1(
val brand: String
) {
LOGITECH("logi"),
DELL("dell");
companion object {
[
{
'repeat(5, 30)': {
id: '{{objectId()}}',
index: '{{index()}}',
uid: '{{integer(0, 9999)}}',
created_at: '{{moment(this.date(new Date(2014, 0, 1), new Date())).format("LLLL")}}',
isActive: '{{bool()}}',
credit_limit: '{{floating(5000, 9000, 2, "0000.00")}}',
credit_balance: '{{floating(1000, 4000, 2, "0000.00")}}',