This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <AZSClient/AZSClient.h> | |
| NSString *const AZURE_STORAGE_CONNECTION_STRING = @"DefaultEndpointsProtocol=https;AccountName=(your account name);AccountKey=(your account key);EndpointSuffix=core.windows.net"; | |
| NSString *const AZURE_STORAGE_CONTAINER = @"files"; | |
| NSString *const LOCAL_FILE_FILEPATH = @"/Users/dino/A.mp4"; | |
| NSString *const LOCAL_FILE_FILENAME = @"A.mp4"; | |
| NSError *error; | |
| AZSCloudStorageAccount *account = [AZSCloudStorageAccount accountFromConnectionString:AZURE_STORAGE_CONNECTION_STRING error:&error]; | |
| AZSCloudBlobClient *client = [account getBlobClient]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var str = "1234中文"; | |
| var hex = string.Join("", Encoding.GetEncoding("BIG5").GetBytes(str).Select(x => $"{x:X2}")); | |
| // hex = "31323334A4A4A4E5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="game"> | |
| <div id="playground"> | |
| </div> | |
| <div id="score"> | |
| <h2 class="text-danger">Scoreboard</h2> | |
| <h3> | |
| <span class="text-info">Your score: <span> | |
| <span id="current-score" class="scores">0</span> | |
| </h3> | |
| <h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| az resource list | curl -H "Content-Type: application/json" -X POST -d @- http://localhost:5000/Home/Recv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using NPOI.HSSF.UserModel; | |
| using NPOI.HSSF.Util; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Search engine (google | bing | duckduckgo) switcher | |
| // @namespace http://dinowang.net/ | |
| // @version 0.1 | |
| // @description | |
| // @author Dino Wang | |
| // @match https://*.google.com/search* | |
| // @match https://*.google.com.tw/search* | |
| // @match https://*.bing.com/search* | |
| // @match https://duckduckgo.com/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Landscape updated="2020-03-18T04:11:30Z" version="1" generator="SAP GUI for Windows v7600.1.4.154"> | |
| <Includes> | |
| <Include url="https://gist.github.com/dinowang/b80427e0928c9b7f37d19095169d5980/raw/SAPUILandscapeGlobal.xml" index="0" /> | |
| </Includes> | |
| <Workspaces> | |
| <Workspace uuid="f390e047-d61a-414d-b543-020ccce3eef9" name="DEMO"> | |
| <Item uuid="3d789ef8-af5c-4d73-a62d-8f988e71bb39" serviceid="d94315fb-19c4-4d6f-8657-51cd73b842eb" /> | |
| </Workspace> | |
| </Workspaces> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Microsoft docuemnts language (en-us/zh-tw/zh-cn) switcher | |
| // @namespace http://dinowang.net/ | |
| // @version 0.1 | |
| // @description | |
| // @author Dino Wang | |
| // @match https://*.microsoft.com/*/* | |
| // @match https://*.azure.cn/*/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for t in $(dotnet tool list -g | awk 'NR>2 {print $1}'); | |
| do | |
| dotnet tool update -g $t | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _update-az-extensions() { | |
| remote_versions=$(az extension list-available --query "[?installed].{name:name, version:version}") | |
| local_versions=$(az extension list --query "[].{name:name, installed_version:version}") | |
| versions=$(jq -n --argjson local "$local_versions" --argjson remote "$remote_versions" ' | |
| [$local, $remote] | | |
| transpose | | |
| map({ | |
| name: .[0].name, | |
| installed_version: .[0].installed_version, |