Skip to content

Instantly share code, notes, and snippets.

View bugparty's full-sized avatar
🎯
Focusing

Bowen Han bugparty

🎯
Focusing
View GitHub Profile
@bugparty
bugparty / dshow_list_audio_device.cpp
Last active August 29, 2015 14:00
A working example of DirectShow Listing Video Input Devices
#include <stdio.h>
#include <dshow.h>
#pragma comment(lib, "strmiids")
int _tmain(int argc, _TCHAR* argv[])
{
ICreateDevEnum *pSysDevEnum = NULL;
HRESULT hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_SystemDeviceEnum,NULL, CLSCTX_INPROC_SERVER,
IID_ICreateDevEnum, (void **)&pSysDevEnum);
if(FAILED(hr)){
@bugparty
bugparty / cowpower.py
Last active August 29, 2015 13:58
闲着蛋疼写的一个河北经贸大学自强之星刷人气工具,自动调整并发线程数,基本能保证服务器满负荷
#coding:utf8
__author__ = 'bowman'
import thread,time
import httplib
alive = 0
limit = 100
aliveLock = thread.allocate_lock()
finished = 0
succeed = 0
fLock = thread.allocate_lock()
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"
@bugparty
bugparty / adhoc
Created September 13, 2013 00:50 — forked from anonymous/adhoc
#!/bin/bash
#####################################
#Author: Leon Lee #
#email: [email protected] #
#QQ: 730395591 #
#Version: 1.0 #
#Note: If you have some good ideas #
# or advice, please mail me^^ #
#####################################