Skip to content

Instantly share code, notes, and snippets.

@royarg02
royarg02 / tlp-stat.txt
Created October 20, 2021 10:44
tlp-stat for tlp bug report
--- TLP 1.4.0 --------------------------------------------
+++ Configured Settings:
/etc/tlp.d/20-troubleshoot.conf L0001: TLP_ENABLE="1"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0008: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0009: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0010: MAX_LOST_WORK_SECS_ON_BAT="60"
@royarg02
royarg02 / match_remote_urls.dart
Created April 27, 2021 12:04
To verify standard flutter remotes
const List<String> urls = [
'https://github.com/flutter/flutter.git', // full HTTPS url with .git
'https://github.com/flutter/flutter', // same as above without .git
'https://githubmirror.com/flutter/flutter.git', // different domain
'https://githubmirror.com/flutter/flutter', // different domain without .git
'http://github.com/flutter/flutter', // http instead of https
'http://www.github.com/flutter/flutter.git', // same as before with www at beginning and .git at end
'https://www.githubmirror.com/flutter', // differnt domain, different path
'https://githubmirror.com/flutter.git', // differnt domain, different path with .git
'[email protected]:flutter/flutter', // ssh url without .git
@royarg02
royarg02 / bug.dart
Created April 9, 2021 11:09
TabBar incorrect interactive region
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@royarg02
royarg02 / fix.dart
Created March 8, 2021 14:37
Flutter issue #26100 probable fix
import 'dart:math' as math;
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@royarg02
royarg02 / random_number_generator.dart
Created November 2, 2020 14:21
For "The development cycle of Flutter: A demonstration"
var r = math.Random(412);
@royarg02
royarg02 / importing_dart_math.dart
Created November 2, 2020 14:19
For "The development cycle of Flutter: A demonstration"
import 'dart:math' as math;
@royarg02
royarg02 / using_offline_assets.dart
Last active November 2, 2020 15:31
For "The development cycle of Flutter: A demonstration"
class _BodyState extends State<Body>{
int _dice = 0;
@override
Widget build(BuildContext context){
return Column(
children: <Widget>[
Image.asset(
'./assets/dice_1.png',
height: 300,
width: 300,
@royarg02
royarg02 / using_column.dart
Created November 2, 2020 14:04
For "The development cycle of Flutter: A demonstration"
class _BodyState extends State<Body>{
@override
Widget build(BuildContext context){
return Column(
children: <Widget>[
//TODO: Define children
],
);
}
}
@royarg02
royarg02 / state_variable.dart
Created November 2, 2020 14:04
For "The development cycle of Flutter: A demonstration"
class _BodyState extends State<Body>{
int _dice = 0;
@override
Widget build(BuildContext context){
...
@royarg02
royarg02 / importing_dice_faces.yaml
Created November 2, 2020 14:02
For "The development cycle of Flutter: A demonstration"
assets:
- assets/dice_1.png
- assets/dice_2.png
- assets/dice_3.png
- assets/dice_4.png
- assets/dice_5.png
- assets/dice_6.png
- assets/empty_dice.png