Skip to content

Instantly share code, notes, and snippets.

View zacksleo's full-sized avatar

zacks zacksleo

View GitHub Profile
@zacksleo
zacksleo / gridview.dart
Last active April 8, 2022 01:25
gridview.dart
Widget build(BuildContext context) {
return MPScaffold(
name: '滤芯之家',
body: Column(
children: [
GridView.count(
shrinkWrap: true,
crossAxisCount: 3,
children: [
GestureDetector(
import 'package:flutter/widgets.dart';
import 'package:mpcore/mpcore.dart';
class DynamoDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MPScaffold(
body: Table(
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
columnWidths: {
@zacksleo
zacksleo / substrate-sidecar-api.json
Created August 18, 2021 01:33
substrate-sidecar-api-json
{
"openapi": "3.0.0",
"info": {
"title": "Substrate API Sidecar",
"description": "Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.",
"contact": {
"url": "https://github.com/paritytech/substrate-api-sidecar"
},
"license": {
"name": "GPL-3.0-or-later",
@zacksleo
zacksleo / pallet-template-expand.rs
Last active August 11, 2021 09:27
pallet-template cargo expand
///
/// The module that hosts all the
/// [FRAME](https://substrate.dev/docs/en/knowledgebase/runtime/frame)
/// types needed to add this pallet to a
/// [runtime](https://substrate.dev/docs/en/knowledgebase/runtime/).
///
pub mod pallet {
use frame_support::{dispatch::DispatchResult, pallet_prelude::*};
use frame_system::pallet_prelude::*;
/// Configure the pallet by specifying the parameters and types on which it depends.
@zacksleo
zacksleo / pallet-registrar-expand.rs
Created August 11, 2021 09:24
pallet-registrar cargo expand
///
/// The module that hosts all the
/// [FRAME](https://substrate.dev/docs/en/knowledgebase/runtime/frame)
/// types needed to add this pallet to a
/// [runtime](https://substrate.dev/docs/en/knowledgebase/runtime/).
///
pub mod pallet {
use frame_support::{log, pallet_prelude::*};
use frame_system::{pallet_prelude::*, RawOrigin};
use pallet_did as did;
@zacksleo
zacksleo / table.go
Created February 8, 2021 04:28
Cli table for go
package main
import (
"os"
"github.com/tomlazar/table"
)
func main() {
tab := table.Table{
@zacksleo
zacksleo / google_checks.xml
Last active July 22, 2020 04:14
google_checks.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html
Checkstyle is very configurable. Be sure to read the documentation at
@zacksleo
zacksleo / java-code-style.xml
Last active August 1, 2020 16:31
java code style config
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
@zacksleo
zacksleo / token.go
Last active April 24, 2019 15:24
create oauth2 server by gin & go-oauth2
package controllers
import (
"fmt"
"log"
"os"
"github.com/project/db"
model "github.com/project/models"
@zacksleo
zacksleo / customer_test.go
Created April 24, 2019 15:10
golang customer test using gin & httpexpece
package api
import (
"log"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/gin-gonic/gin"