Skip to content

Instantly share code, notes, and snippets.

View ariesy's full-sized avatar

Kun Zhu ariesy

  • Shenzhen,China
  • 10:59 (UTC +08:00)
View GitHub Profile
@ariesy
ariesy / sources.list
Last active May 11, 2023 04:00
upgrade ubuntu 18.04 (Bionic Beaver) to 20.04 (Focal Fossa) on android phone linux deploy environment
deb http://ports.ubuntu.com/ bionic-updates main restricted
deb-src http://ports.ubuntu.com/ bionic-updates main restricted
**https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#bash-loses-network-connectivity-once-connected-to-a-vpn**
Assuming you have followed all the steps to install / setup WSL2 -> https://docs.microsoft.com/en-us/windows/wsl/install-win10
- Restart WSL2
- Open powershell and run following command
`wsl --shutdown`
- Test internet connection in WSL2
- ping google.com, it should work now.
@ariesy
ariesy / sources.list
Last active April 21, 2022 06:59 — forked from h0bbel/sources.list
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
deb http://10.32.5.82/ubuntu xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-proposed main multiverse restricted universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
@ariesy
ariesy / SimpleHttpClient.cs
Created December 8, 2015 05:29 — forked from bryanbarnard/SimpleHttpClient.cs
Simple C# .NET 4.5 HTTPClient Request Using Basic Auth and Proxy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
namespace HTTP_Test
@ariesy
ariesy / NullObjectPattern.cs
Created October 26, 2015 01:36
null object pattern that can use in dictionary
/*
http://stackoverflow.com/a/22261282/880163
*/
public struct NullObject<T>
{
[DefaultValue(true)]
private bool isnull;// default property initializers are not supported for structs
private NullObject(T item, bool isnull) : this()
{
@ariesy
ariesy / 12306.user.js
Created January 10, 2012 12:29 — forked from xczdx/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js