Skip to content

Instantly share code, notes, and snippets.

View mashihua's full-sized avatar
🏠
Working from home

Shihua Ma mashihua

🏠
Working from home
View GitHub Profile
@mashihua
mashihua / win_set_proxy_server_powershell.ps1
Created February 22, 2024 02:08 — forked from hygorluz/win_set_proxy_server_powershell.ps1
Set Windows Proxy Server via PowerShell
####
# SET-INTERNETPROXY
#
# DESCRIPTION
# This function will set the proxy server and (optional) Automatic configuration script.
#
# SYNTAX
# Set-InternetProxy [-Proxy] <string[]> [[-acs] <string[]>] [<CommonParameters>]
#
# EXAMPLES
@mashihua
mashihua / chinese.m3u
Created February 10, 2024 05:59
m3u for iptv
#EXTM3U x-tvg-url=""
#EXTINF:-1 tvg-id="600001859" tvg-country="CN" tvg-language="Chinese" tvg-name="央视频道" tvg-logo="https://resources.yangshipin.cn/assets/oms/image/202306/d57905b93540bd15f0c48230dbbbff7ee0d645ff539e38866e2d15c8b9f7dfcd.png?imageMogr2/format/webp" group-title="CCTV1 综合",CCTV1 综合
http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226231/index.m3u8
#EXTINF:-1 tvg-id="600001800" tvg-country="CN" tvg-language="Chinese" tvg-name="央视频道" tvg-logo="https://resources.yangshipin.cn/assets/oms/image/202306/20115388de0207131af17eac86c33049b95d69eaff064e55653a1b941810a006.png?imageMogr2/format/webp" group-title="CCTV2 财经",CCTV2 财经
http://dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221226195/index.m3u8
#EXTINF:-1 tvg-id="600001801" tvg-country="CN" tvg-language="Chinese" tvg-name="央视频道" tvg-logo="https://resources.yangshipin.cn/assets/oms/image/202306/7b7a65c712450da3deb6ca66fbacf4f9aee00d3f20bd80eafb5ada01ec63eb3a.png?imageMogr2/format/webp" group-title="CCTV3 综艺",CCTV3 综艺
http://dbiptv.sn.chinamobi
@mashihua
mashihua / 关于KMS,以及自己写的脚本
Created December 5, 2022 02:47 — forked from 798886844/关于KMS,以及自己写的脚本
关于KMS,以及自己写的脚本
玩激活玩了很久了,很多人不懂什么是KMS,和普通的密钥激活有什么区别。大多数人对KMS的认识都停留在“病毒”、“修改主页”,或者是“180天循环激活”和“非永久激活”这些个层面上。并且这种意识被越来越多的人所接受,被越来越多的大佬所不齿。
但是我今天要告诉你的是,这种认识是错误的。
#### 先了解一下微软的激活机制吧。
上个世纪的产品我就不说了,我就从最近的产品开始说起吧,包括Windows 7及其以后的版本,Office 2010及其以后的版本。
从这个版本时代开始,微软主打的就是对企业和政府以及教育行业的产品开发,个人业务不再是其主要发展对象。也是从这个时代开始,微软取消了本地激活码的激活方式,而是采取了看上去更能防止盗版的在线激活的方式。
@mashihua
mashihua / post-commit
Created June 19, 2012 07:34
Git commit hook for trello.com
#!/usr/bin/env node
//please requist your app token from
//https://trello.com/1/connect?key=yourkey&name=git-hook&expiration=never&response_type=token&scope=read,write
var key = "your key";
var token = "your token";
//https://trello.com/board/-/4e9003324a517dad44465056
var board_id = "4e9003324a517dad44465056";
var Trello = require("node-trello");
@mashihua
mashihua / get-node
Created August 25, 2011 05:59
All built-in function and javascript source in Node.js
#!/usr/bin/env node
//all built-in module and lib/*.js,expcept node.js
['constants','io_watcher','timer','buffer','cares','child_process','evals','fs','net','http_parser','signal_watcher','stdio','os'].forEach(function(v){
console.log('built-in module:\t' + v);
console.dir(require('sys').inspect(process.binding(v)));
});
console.log('all javascript from built-in module natives,expect node.js');
var sources = process.binding('natives');
Object.keys(sources).forEach(function(key){
@mashihua
mashihua / Capfile
Created October 12, 2011 10:40
Capistrano deploy script for node.js
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
load 'config/node'
@mashihua
mashihua / open163_dl.sh
Created June 15, 2018 03:25 — forked from yuzebin/open163_dl.sh
网易公开课下载脚本 open.163.com
#!/usr/bin/env bash
# author: yuzebin AT gmail
# 20180614
main() {
mkdir -p $2
cd $2
curl $1 | grep -e "http://open.163.com/movie/" | enca -L zh -x UTF-8 | sed -e "s/\<a href=\"//g" -e "s/\>//g" -e "s/<\/a//g" | grep -v class> $2.lst
num=0
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
@mashihua
mashihua / emojis.json
Created December 18, 2017 16:21 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "&#128104;&zw
@mashihua
mashihua / install.md
Last active November 16, 2017 02:18 — forked from seamusjr/install.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch.

These commands are good as of 2012-03-18.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Note: Make sure you install the XCode Command Line Tools after XCode is done installing. To do this go to Xcodes -> Preferences -> Downloads -> Command Line Tools -> Install. If you don't you might not be able to install brew packages (i.e. brew install wget will fail).*