Skip to content

Instantly share code, notes, and snippets.

View debuggerx01's full-sized avatar
💭
I may be slow to respond.

debuggerx01

💭
I may be slow to respond.
View GitHub Profile
@debuggerx01
debuggerx01 / TabBarViewDemo.dart
Last active May 18, 2018 05:25
TabBarViewDemo
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@debuggerx01
debuggerx01 / DateFormat.dart
Created May 18, 2018 05:01
DateFormat for Dart
void main() {
var date = new DateTime.now();
print(formatDate(date));
}
String formatDate(DateTime date){
return '${date.year}-'
'${fixInt2Str(date.month)}-'
'${fixInt2Str(date.day)} '
'${fixInt2Str(date.hour)}:'
'${fixInt2Str(date.minute)}:'
@debuggerx01
debuggerx01 / JumpToIndexDemo.dart
Created August 10, 2018 03:58
JumpToIndexDemoForFlutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:rect_getter/rect_getter.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Filename : clone.py
# @Date : 18-2-6 12:36
# @Author : DebuggerX
import re
import urllib
import subprocess
@debuggerx01
debuggerx01 / visible_items_of_listview.dart
Last active July 2, 2024 08:03
Visible Items of ListView Demo
import 'package:flutter/material.dart';
import 'package:rect_getter/rect_getter.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Visible Demo',
@debuggerx01
debuggerx01 / FileServer.py
Last active January 7, 2020 09:03
基于修改过的python3的http.server的脚本再次修改而来支持文件上传下载及双向剪切板操作的python3脚本,支持pc(需要pyperclip库)及安卓(需要termux:api)
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
import 'package:flutter/material.dart';
import 'package:battery_indicator/battery_indicator.dart';
import 'package:battery/battery.dart';
import 'package:flutter/widgets.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@debuggerx01
debuggerx01 / VerifyCodeInput.scss
Created May 5, 2020 15:22
A component for taro app
$component: '.verify-code-input';
#{$component} {
display: flex;
width: 100%;
flex-direction: row;
justify-content: space-around;
align-items: center;
&__view {
#!/usr/bin/env bash
mkdir "bak"
images=$(ls *.{png,jpg})
for image in $images
do
cwebp $image -o ${image%.*}.webp
mv $image ./bak/$image
done
@debuggerx01
debuggerx01 / main.dart
Created October 14, 2022 02:39
flutter_del_edit_list_test
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override