Skip to content

Instantly share code, notes, and snippets.

Avatar
🍺
drinking

Bill.Zhuang billzhuang

🍺
drinking
  • EF
View GitHub Profile
@billzhuang
billzhuang / hello.go
Created Sep 10, 2020
test local dead port
View hello.go
package main
import (
"fmt"
"net"
"os"
)
func main() {
arguments := os.Args
@billzhuang
billzhuang / gamecube-checker.sh
Last active Feb 8, 2019
amazon stock checker
View gamecube-checker.sh
#!/bin/bash
#CHROME_HEADER="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36"
GC_CONTROLLER="GameCube-Controller_B07DJX3Y47"
GC_ADAPTER="GameCube-Adapter_B07DJX3ZR8"
# replace to your hook url
HOOK_URL="https://outlook.office.com/webhook/xxxyyyzzz"
# generate random user agent
HEADER1="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
@billzhuang
billzhuang / bulk-remove-sharing.js
Last active Jan 30, 2020
Google Apps script to bulk remove default sharing in Google Drive
View bulk-remove-sharing.js
/**
* Google Apps has some admin restriction, such as sharing to whole group by default
* this script can remove all sharing and reset to private only
* For more information on interacting with folders, see
* https://developers.google.com/apps-script/reference/drive/folder
* Github gist is here: https://gist.github.com/billzhuang/43faa0a8daea8f0dab74
*/
// step 1, prepare data in excel
function prepareData(){
View getcclcount.cs
<%@ Page Language="C#" AutoEventWireup="true" ViewStateMode="Disabled" Inherits="System.Web.UI.Page" %>
<%@ Import Namespace="System.Reflection" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
try
{
var asms = AppDomain.CurrentDomain.GetAssemblies();
@billzhuang
billzhuang / app-memory
Created Mar 31, 2014
get app domain memory usage
View app-memory
<%@ Page Language="C#" AutoEventWireup="true" ViewStateMode="Disabled" Inherits="System.Web.UI.Page" %>
<%@ Import Namespace="System.Diagnostics" %>
<script runat="server">
//http://stackoverflow.com/questions/2611141/calculate-private-working-set-memory-using-c-sharp
//http://cybernetnews.com/cybernotes-windows-memory-usage-explained/
//http://blogs.technet.com/b/askperf/archive/2010/03/30/perfmon-identifying-processes-by-pid-instead-of-instance.aspx
//http://msdn.microsoft.com/en-us/library/aa965225%28VS.85%29.aspx
protected void Page_Load(object sender, EventArgs e)
@billzhuang
billzhuang / dotnetpkasp
Last active Aug 29, 2015
dotnet PK asp
View dotnetpkasp
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
@billzhuang
billzhuang / links.md
Created Oct 30, 2012 — forked from igrigorik/links.md
HAR Show links & resources
View links.md
@billzhuang
billzhuang / readwriteline.go
Created Apr 11, 2012
read/write lines for a text file used for inner contacts
View readwriteline.go
package main
import (
"os"
"bufio"
"bytes"
"io"
"fmt"
"strings"
)
You can’t perform that action at this time.