Skip to content

Instantly share code, notes, and snippets.

View TianyuanC's full-sized avatar
🎯
Focusing

Tianyuan Chu TianyuanC

🎯
Focusing
  • 127.0.0.1:19002
View GitHub Profile
@TianyuanC
TianyuanC / thm.txt
Last active January 25, 2022 18:32
<?php print exec("hostname"); ?>
@TianyuanC
TianyuanC / Profile.js
Last active April 10, 2019 06:25
Gift for Le Var
import React, { Component } from "react";
const users = {
1: {
id: 1,
name: "Jane Cruz",
userName: "coder"
},
2: {
id: 2,
name: "Matthew Johnson",
- contentLib:
featureToggle: MODELS_IN_REPO
title: Find Models and Points of Interest within Files
description: '"Models" and "Points of Interest" folders have been created in the Public folder to help you organize existing files. You can rename, move, and change share settings like other files.'
- second:
title: Smart Predict
description: From Smart Predict, you can now publish a predictive model to Predictive Analytics Integrator (PAi) as a new predictive scenario. This facilitates the creation of predictive scenarios in PAi.
- third:
requiredRole: ADMIN
title: Stories
@TianyuanC
TianyuanC / csharp.md
Last active September 15, 2015 23:43
markdown c#

DALs

Build status Coverage Status NuGet

Tired of writing the same block of code for the data access layer for each project, I extracted the common pieces out and put tons of unit test coverage.

  • Execute Stored Procedure using SqlTransaction, SqlConnection and SqlCommand
  • Access Restful Services using HttpClient
  • Azure storages...
@TianyuanC
TianyuanC / npm-project-setup.sh
Created September 4, 2015 21:57
Free Code Camp basejump
npm install npm@latest -g
rm -rf * && echo "export NODE_PATH=$NODE_PATH:/home/ubuntu/.nvm/v0.10.35/lib/node_modules" >> ~/.bashrc && source ~/.bashrc && npm install -g yo grunt grunt-cli generator-angular-fullstack && yo angular-fullstack
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<h2 style='font-family:Lobster;'>Lobster</h2>
@TianyuanC
TianyuanC / app.config.xml
Created July 3, 2015 07:06
logging through config files
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="fileLog" type="System.Diagnostics.TextWriterTraceListener" initializeData="application.log" />
<add name="consoleLog" type="System.Diagnostics.ConsoleTraceListener" />
<add name="eventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="TraceLog" />
</listeners>
</trace>
</system.diagnostics>
@TianyuanC
TianyuanC / badges.md
Last active August 29, 2015 14:23
Badges for DALs.Core

Build status Coverage Status NuGet

@TianyuanC
TianyuanC / OverwriteScheduleTask.ps1
Created June 25, 2015 22:14
Create scheduled task and overwrite if already exists
function Delete-ScheduleTask([string] $taskName)
{
Write-Host "Delete schedule task for $taskName"
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false
}
function Create-ScheduleTask([string] $taskName, [string] $startTime, [Int] $interval)
{
Write-Host "Create schedule task for $taskName"
$action = New-ScheduledTaskAction -Execute "C:\OctopusApps\app.exe" -Argument $taskName
@TianyuanC
TianyuanC / wadconfig.xml
Created May 25, 2015 17:13
WAD Config XML
<?xml version="1.0" encoding="utf-8"?>
<PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<WadCfg>
<DiagnosticMonitorConfiguration overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" />
<Directories scheduledTransferPeriod="PT1M">
<IISLogs containerName="wad-iis-logfiles" />
<FailedRequestLogs containerName="wad-failedrequestlogs" />
</Directories>
<PerformanceCounters scheduledTransferPeriod="PT1M">