Skip to content

Instantly share code, notes, and snippets.

View michealzh's full-sized avatar
😎
interesting

michealzh michealzh

😎
interesting
View GitHub Profile
@michealzh
michealzh / typescript
Created November 18, 2024 09:46
鸿蒙 next 获取微信开放平台需要的 Identifier
aboutToAppear(): void {
let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO
try {
bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => {
hilog.info(0x0000, 'testTag', 'getBundleInfoForSelf successfully. Data: %{public}s', JSON.stringify(data));
}).catch((err: BusinessError) => {
hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed. Cause: %{public}s', err.message);
});
} catch (err) {
@michealzh
michealzh / gist:75104c470c056b400393fdd9d80c5864
Created June 23, 2020 10:18
git delete branch except master
#ref: https://coderwall.com/p/x3jmig/remove-all-your-local-git-branches-but-keep-master
git branch | grep -v "master" | xargs git branch -D
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@michealzh
michealzh / JavaScript.sublime-build
Created September 19, 2016 07:28 — forked from corbanb/JavaScript.sublime-build
Sublime Text - Tools > Build System > New Build System
// Sublime Text - Build System for Javascript
{
"cmd": ["node", "$file"],
"selector": "source.js"
}
@michealzh
michealzh / SplClassLoader.php
Created August 23, 2016 07:39 — forked from jwage/SplClassLoader.php
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@michealzh
michealzh / README.md
Last active September 15, 2015 01:49 — forked from magnetikonline/README.md
Nginx 1.8.0 modules.

Nginx 1.8.0 modules

Optional

--with-cpp_test_module                     ngx_cpp_test_module
--with-google_perftools_module             ngx_google_perftools_module
--with-http_addition_module                ngx_http_addition_module
--with-http_auth_request_module            ngx_http_auth_request_module
--with-http_dav_module                     ngx_http_dav_module
--with-http_degradation_module             ngx_http_degradation_module