Skip to content

Instantly share code, notes, and snippets.

View Zfinix's full-sized avatar
🫡
Build AI Powered Products

Chiziaruhoma Ogbonda Zfinix

🫡
Build AI Powered Products
View GitHub Profile
# place at android/fastlane/Fastfile
desc "Deploy a new beta build to Google Play"
lane :beta do
build_number = number_of_commits()
Dir.chdir "../.." do
sh("flutter", "packages", "get")
sh("flutter", "clean")
sh("flutter", "build", "appbundle", "--build-number=#{build_number}")
end
# place at ios/fastlane/Fastfile
desc "Deploy a new build to Testflight"
lane :beta do
Dir.chdir "../.." do
sh("flutter", "packages", "get")
sh("flutter", "clean")
sh("flutter", "build", "ios", "--release", "--no-codesign")
end
xcodebuild(
@Zfinix
Zfinix / config.yml
Last active December 1, 2020 22:45
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Orchestrate or schedule a set of jobs
jobs:
build:
# Declare a dependency on the cirrusci/flutter docker image
docker:
- image: cirrusci/flutter:v1.5.8
import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LocalStorage {
static Future<SharedPreferences> get prefs async =>
# Automatically generated on 2020-11-16 UTC from https://codemagic.io/app/5fb2a25c605096f91720b983/settings
# Note that this configuration is not an exact match to UI settings. Review and adjust as necessary.
workflows:
default-workflow:
name: Default Workflow
max_build_duration: 60
environment:
vars:
APP_CONFIG: ewogICJnQXBpS2V5IjogIkFJemFTeUEzbl95bTlWUUU2NURyRUVpdDZobnNtWDgyR3FGb3Q0QSIKfQo=
@Zfinix
Zfinix / _dev.dart
Last active November 16, 2020 18:58
import 'dart:async';
import '../config_loader.dart';
import '../env_config.dart';
class Config implements EnvConfig {
Config._();
static Future<EnvConfig> create() async {
// read secrets
@Zfinix
Zfinix / main.dart
Last active November 16, 2020 12:37
...
Socket socket;
@override
void initState() {
super.initState();
connectToServer();
}
import 'dart:convert';
import 'dart:math' as math;
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:image/image.dart' as image;
@Zfinix
Zfinix / index.js
Last active November 12, 2020 07:01
Web socket server
const server = require('http').createServer()
const io = require('socket.io')(server)
io.on('connection', function (client) {
console.log('client connect...', client.id);
client.on('typing', function name(data) {
console.log(data);
io.emit('typing', data)
{
"name": "socket_chat_server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ./index.js"
},
"author": "",