Skip to content

Instantly share code, notes, and snippets.

View robinvanyang's full-sized avatar
🎯
Focusing

RobinVanYang robinvanyang

🎯
Focusing
  • Shanghai. China.
View GitHub Profile
@CaiJingLong
CaiJingLong / home_container.dart
Last active July 29, 2021 14:34
flutter 懒加载 切换保持状态
class HomeContainer extends StatefulWidget {
final List<Widget> children;
final int currentIndex;
const HomeContainer({
Key key,
this.children,
this.currentIndex,
}) : super(key: key);
@lilydjwg
lilydjwg / gh-check
Last active March 18, 2024 04:43
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@thomasballinger
thomasballinger / subprocess.py
Created December 15, 2013 23:26
Using a pseudo-terminal to interact with interactive Python in a subprocess
from subprocess import Popen, PIPE
import pty
import os
from select import select
import sys
import tty
master, slave = pty.openpty()
p = Popen(['python'], stdin=slave, stdout=PIPE, stderr=PIPE)
pin = os.fdopen(master, 'w')