Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Yulong Jing jingyulong

🎯
Focusing
View GitHub Profile
@jingyulong
jingyulong / VultrDataCentersPingTester.bat
Created Dec 12, 2018
From Local to Vultr DataCenters Ping Tester
View VultrDataCentersPingTester.bat
@echo off
echo ========================================
echo From Local to Vultr DataCenters Ping Tester
echo ========================================
pause
echo=
echo 01 Tokyo
ping hnd-jp-ping.vultr.com -n 10
echo=
echo =============================
View gist:696bd4a4a2c53d65c08482138492e0f5
{
"editor.formatOnPaste": true,
"editor.formatOnType": false,
"editor.formatOnSave": true,
"prettier.eslintIntegration": true,
"eslint.autoFixOnSave": true,
"eslint.enable": true,
"eslint.validate": [
{
"language": "html",
View V2_ReadFile.cs
while (ReadLine != null)
{
if (condition)
{
//1#读取并在别的文件写入
while (ReadLine != null)
{
if (condition)
{
//2#读取并在别的地方写入
View UniqueLogin.cs
public class OnlineInfo
{
private static readonly string CurrentSessionId = HttpContext.Current.Session.SessionID;
public static string CurrentUserName { get; set; }
/// <summary>
/// Key:SessionID,Value:UserName
/// </summary>
public static Dictionary<string, string> List
@jingyulong
jingyulong / GetTimeStamp.cs
Created Dec 18, 2018
Get TimeStamp in C#
View GetTimeStamp.cs
// Unix time, which is defined as the number of seconds since midnight (UTC) on 1st January 1970.
// The latest version of .Net (v4.6) just added built-in support for Unix time conversions. That includes both to and from Unix time represented by either seconds or milliseconds.
// Unix time in seconds to DateTimeOffset:
// DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeSeconds(1000);
// DateTimeOffset to Unix time in seconds:
// long unixTimeStampInSeconds = dateTimeOffset.ToUnixTimeSeconds();
// Unix time in milliseconds to DateTimeOffset:
// DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeMilliseconds(1000000);
// DateTimeOffset to Unix time in milliseconds:
// long unixTimeStampInMilliseconds = dateTimeOffset.ToUnixTimeMilliseconds();
You can’t perform that action at this time.