View Onboarding.dart
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 OnboardingScreen extends StatefulWidget { | |
const OnboardingScreen({Key? key}) : super(key: key); | |
@override | |
_OnboardingScreenState createState() => _OnboardingScreenState(); | |
} | |
class _OnboardingScreenState extends State<OnboardingScreen> { | |
final TextEditingController _nameController = TextEditingController(); |
View monitor.sh
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
#!/usr/bin/env bash | |
export SODA_SCRIPTS_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
source ${SODA_SCRIPTS_ROOT}/__echo.sh | |
#### Websocket Setup | |
SERVER_PORT=3333 | |
WS_PIPE=/tmp/_websocket.tmp | |
IN_PIPE=/tmp/_in_websocket.tmp |
View websocket_server.sh
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
#!/usr/bin/env bash | |
IN_PIPE=$1; | |
_hex() { | |
typeset num=`echo 'obase=16; ibase=10; '"$1" | bc` | |
if ((${#num} == 1)); then | |
num=0"$num" | |
fi |
View color_ext.dart
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
// | |
// color.dart | |
// foundation | |
// | |
// Author: Wess Cope (me@wess.io) | |
// Created: 09/16/2021 | |
// | |
// Copywrite (c) 2021 Wess.io | |
// |
View meta.dart
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 'dart:convert'; | |
class Meta { | |
Map<String, dynamic> _backing; | |
dynamic get(String key) => _backing[key]; | |
void insert(Map<String, dynamic> data) => _backing = {..._backing, ...data}; | |
Meta set(String key, dynamic value) { | |
_backing[key] = value; |
View provider.dart
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 'package:bastion/providers/data.dart'; | |
import 'package:fluentui_system_icons/fluentui_system_icons.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:hive/hive.dart'; | |
import 'package:window_size/window_size.dart'; | |
enum NavOption { | |
converter, | |
profiles, |
View FlutterChannel.swift
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 FlutterChannel { | |
static private let _instance = FlutterChannel() | |
private let channel = { | |
let _channel = FlutterMethodChannel(...) | |
channel.setMethodCallhandler(FlutterChannel.route) | |
return _channel | |
}() | |
View gist:917d0142b3c6079abb82327d251a71c7
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
def handle_call({:put, key, value}, _from, state) do | |
{:reply, :ok, Map.put(state, key, value)} | |
end | |
def handle_call({:get, key, value}, _from, state) do | |
{:reply, :ok, Map.get(state, key, value)} | |
end |
View Cargo.toml
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
[package] | |
name = "layerkeep-api" | |
version = "0.0.1" | |
authors = ["wess <me@wess.io>"] | |
edition = "2018" | |
[dependencies] | |
tide = "0.15.0" | |
tera = "1.5.0" | |
tide-tera = "0.2.2" |
View model.rs
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
use serde::{Serialize}; | |
use mongodb::bson::{ | |
to_bson, | |
Bson, | |
}; | |
pub trait Model : Serialize { | |
fn to_bson(&self) -> Bson { | |
to_bson(self).unwrap() |
NewerOlder