Skip to content

Instantly share code, notes, and snippets.

@pedia
pedia / main.dart
Created January 28, 2023 09:33
TextField with Button suffix and IME bug
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
debugShowCheckedModeBanner: false,
home: DemoApp(),
),
);
}
@pedia
pedia / make-up.sh
Created September 27, 2021 04:39
Disable service to speed up macos
pstree | wc -l
S="com.apple.postfix.newaliases
com.apple.postfix.master
com.apple.GameController.gamecontrollerd
com.oray.sunlogin.helper
com.oray.sunlogin.service
com.apple.siri.acousticsignature
com.apple.siriinferenced
com.apple.siri.acousticsignature
@pedia
pedia / construct-bench.dart
Last active February 19, 2021 07:24
benchmark constructor
import 'package:benchmark_harness/benchmark_harness.dart';
class Foo {
int x;
Foo({this.x});
}
class EmptyBench extends BenchmarkBase {
const EmptyBench() : super('Empty');
2019-12-30 18:48:52.204 9276-9276/pedia.cast.pall D/tcdlistener: onActiveResult request: 10002 result: -1 data: Intent { (has extras) }
2019-12-30 18:48:52.214 9276-9276/pedia.cast.pall I/wmp: |2019-12-30 18:48:52.214|I|9276|9276|tcd_engine_sender_impl.cc:211|StartCast| config.pin:832779
2019-12-30 18:48:52.214 9276-9276/pedia.cast.pall I/wmp: |2019-12-30 18:48:52.214|I|9276|9276|tcd_engine_sender_impl.cc:999|DoCast|config pin:[invitee_pin:832779 invitee_wmp_uid: invitee_appid: invitee_corpid: invite_type:0]
2019-12-30 18:48:52.215 9276-9276/pedia.cast.pall I/wmp: |2019-12-30 18:48:52.215|I|9276|9276|tcd_engine_sender_impl.cc:1049|operator()|[ROUTER-GET] [GET://tcd/cast_service/get_ability_info] Variant[7fe7784ba0, b]:map.size:2 => {
'dst_pin': "832779"
'dst_wmp_uid': ""
}
2019-12-30 18:48:52.254 9276-9352/pedia.cast.pall I/wmp: |2019-12-30 18:48:52.254|I|9352|9276|tcd_engine_sender_impl.cc:1049|operator()|[ROUTER-GET-RESPONSE] [GET://tcd/cast_service/get_ability_info] Variant[71403f7550, b]:map
@pedia
pedia / fuchsia-review-stats-parser.py
Created April 3, 2019 14:55
fuchsia review history parser
# -*- encoding utf-8
import json, datetime
import os, sys
from tornado.util import ObjectDict
from collections import Counter
def gen(folder):
for i in range(1, 99):
fn = os.path.join(folder, str(i) + ".json")
@pedia
pedia / aliyun-wvideo-ips.txt
Created July 14, 2016 08:28
aliyun-cdn-check
106.119.190.231
106.119.190.232
116.207.117.113
116.207.117.114
1.193.188.246
1.193.188.248
119.84.3.111
119.84.3.92
121.18.239.188
121.18.239.189
@pedia
pedia / video-urls.txt
Created August 10, 2015 06:16
video url for Dnion
This file has been truncated, but you can view the full file.
/voice1/M00/04/0F/wKiFWFM6HV6AfWkIAAZcbxKnhkM492_wpd.mp4
/voice1/M00/04/0E/wKiFWlM6HV6AfdqZAAkcSrEJKzw935_wpd.mp4
/voice1/M00/04/30/wKiFWlM9B0-APKIrAA1KWIi7dhw452_wpd.mp4
/voice1/M00/04/30/wKiFWFM9B0mAHrOTAAVLw2dJRbs656_wpd.mp4
/voice1/M00/04/C7/wKiFWFNRy7qABPK2ABrAqtlGHtY271_wpd.mp4
/voice1/M00/05/1F/wKiFWFNpy_uAdvSOABOhqhwFDjk140_wpd.mp4
/voice1/M00/04/30/wKiFWlM9B0qAEYTZAAhVqqWBOPk925_wpd.mp4
/voice1/M00/04/30/wKiFWFM9B0aANf6zAAp6YWvnNZw590_wpd.mp4
/voice1/M00/05/20/wKiFWFNp6AmAVDq6AAjLk1Bu5O4745_wpd.mp4
/voice1/M00/05/20/wKiFWlNp6BqAapErAAXPn5ls8l8487_wpd.mp4
@pedia
pedia / parse.java
Last active December 23, 2015 00:09
import java.io.File;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashMap;
# Copyright (c) 2010, Philip Plante of EndlessPaths.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
html
http
uri
iframe
form
multipart/form-data
javascript
xml
xpath
json