Skip to content

Instantly share code, notes, and snippets.

Avatar

Lukasz Piliszczuk lukaspili

View GitHub Profile
View printer_repository.dart
import 'dart:io';
import 'package:esc_pos_printer/esc_pos_printer.dart';
import 'package:esc_pos_utils/esc_pos_utils.dart';
import 'package:flutter/services.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:image/image.dart' as image;
import 'package:mimosushi_forecast/data/data.dart';
import 'package:mimosushi_forecast/presentation/presentation.dart';
View iap.rb
require 'google/apis/androidpublisher_v3'
class IapService
def self.validate_receipt(source:, sku:, transaction_id:, transaction_receipt:)
if source == :appstore
validate_appstore(
source: source,
sku: sku,
transaction_id: transaction_id,
View mimosushi-zelty.css
#zwgth {
margin-bottom: 20px !important;
}
#zwgth .logo {
display: none !important;
}
#zwgth h1 {
display: none !important;
View cal.java
public void run() {
if (stream != null) {
running = true;
try {
StopWatch sw = new StopWatch();
sw.Start();
float leqA2 = 0f;
float leqA = 0f;
arr_samples = IOStream.toFloat(stream.get(Utils.LEQ_1SEC));
View Bloc.dart
import 'package:x/presentation/presentation.dart';
import 'activities_actions.dart';
import 'activities_state.dart';
class ActivitiesBloc {
BlocController<ActivitiesState, Action> get controller => _core;
BlocCore<ActivitiesState, ActivitiesStateBuilder, Action> _core;
ActivitiesBloc() {
View aye.dart
import 'dart:math' as math;
// 1. MODELS
enum Gender { female, male }
class Activity {
Activity({this.id, this.category, this.hours, this.frequency, this.recordings});
final int id;
final int category;
View main.dart
import 'dart:math' as math;
// 1. MODELS
class Activity {
Activity(
{this.id, this.category, this.hours, this.frequency, this.recordings});
final int id;
final int category;
final int hours;
View imagekit
curl --request POST \
--url https://api.imagekit.io/v1/files/upload \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--form fileName=user-21.jpg \
--form publicKey=sZ/a9Az1UFoCCZs4xJvJrcsTGLs= \
--form signature=f5a779108454d224cb9ab4fe1ebb52f44fb19b70 \
--form token=d502bf6a-1aac-4bd4-8241-845db283f05a \
--form expire=1567694190 \
--form useUniqueFilename=true \
--form isPrivateFile=true \
View 1.kt
interface ProductApi {
@GET("categories")
fun categories(): Observable<Response<List<CategoryData>>>
@GET("produitscat")
fun products(): Observable<Response<List<ProductData>>>
}
View bluetooth.py
#!/usr/bin/python
from __future__ import absolute_import, print_function, unicode_literals
import dbus
import dbus.mainloop.glib
try:
from gi.repository import GObject
except ImportError:
import gobject as GObject