Skip to content

Instantly share code, notes, and snippets.

View billzhuang's full-sized avatar
💾
happy hacking

Bill Zhuang billzhuang

💾
happy hacking
View GitHub Profile
@billzhuang
billzhuang / vod-player.html
Created August 3, 2021 05:18
10c vod player for subtitles
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
<title></title>
<link href="//web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/ie8/videojs-ie8.js"></script>
@billzhuang
billzhuang / hello.go
Created September 10, 2020 09:46
test local dead port
package main
import (
"fmt"
"net"
"os"
)
func main() {
arguments := os.Args
@billzhuang
billzhuang / gamecube-checker.sh
Last active February 8, 2019 16:39
amazon stock checker
#!/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 November 19, 2022 06:08
Google Apps script to bulk remove default sharing in Google Drive
/**
* 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(){
@billzhuang
billzhuang / getcclcount.cs
Last active August 29, 2015 14:01
CCL count
<%@ 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 March 31, 2014 08:22
get app domain memory usage
<%@ 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 August 29, 2015 13:57
dotnet PK asp
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 October 30, 2012 03:49 — forked from igrigorik/links.md
HAR Show links & resources
@billzhuang
billzhuang / readwriteline.go
Created April 11, 2012 14:15
read/write lines for a text file used for inner contacts
package main
import (
"os"
"bufio"
"bytes"
"io"
"fmt"
"strings"
)