Skip to content

Instantly share code, notes, and snippets.

:octocat:
on code

Takekazu Omi takekazuomi

:octocat:
on code
Block or report user

Report or block takekazuomi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@takekazuomi
takekazuomi / styles.xml
Created Oct 31, 2019
元号表示のときに使われるformat code
View styles.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"
xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">
<numFmts count="2">
<numFmt numFmtId="178" formatCode="[$-411]ggge&quot;&quot;m&quot;&quot;d&quot;&quot;;@"/>
<numFmt numFmtId="179" formatCode="[$]ggge&quot;&quot;m&quot;&quot;d&quot;&quot;;@" x16r2:formatCode16="[$-ja-JP-x-gannen]ggge&quot;&quot;m&quot;&quot;d&quot;&quot;;@"/>
</numFmts>
View sdkvnext.cs
using System;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
// Azure Storage Blobs client library for .NET
// https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md
// samples
// https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/storage/Azure.Storage.Blobs/samples
namespace blob
View result.md
dotnet publish --nologo -c Release -r win10-x64 --self-contained=false /p:PublishSingleFile=true /p:PublishTrimmed=false /p:PublishReadyToRun=false -o work1
dotnet publish --nologo -c Release -r win10-x64 --self-contained=true  /p:PublishSingleFile=true /p:PublishTrimmed=false /p:PublishReadyToRun=false -o work2
dotnet publish --nologo -c Release -r win10-x64 --self-contained=true  /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=false  -o work3
dotnet publish --nologo -c Release -r win10-x64 --self-contained=true  /p:PublishSingleFile=true /p:PublishTrimmed=false /p:PublishReadyToRun=true  -o work4
dotnet publish --nologo -c Release -r win10-x64 --self-contained=true  /p:PublishSingleFile=true /p:PublishTrimmed=true /p:PublishReadyToRun=true   -o work5
View psakefile.ps1
# invoke-psake -task Init,Publish
Task default -Depends Publish
Task Init {
dotnet new console -o .\singleexe -n singleexe
}
Task Publish {
cd singleexe
dotnet publish --nologo -c Release -r win10-x64 --self-contained=false /p:PublishSingleFile=true -o work1
@takekazuomi
takekazuomi / GzFileSource.cs
Created Mar 17, 2019
IMultiStreamSource for gzipped file
View GzFileSource.cs
public sealed class GzFileSource : IMultiStreamSource
{
private readonly string[] _paths;
public GzFileSource(params string[] paths)
{
if (paths == null || (paths.Length == 1 && paths[0] == null))
{
_paths = new string[0];
return;
View before.txt
; <<>> DiG 9.10.3-P4-Debian <<>> @a.root-servers.net. . DNSKEY
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36315
;; flags: qr aa rd; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
View CommonDefinitions.json
--- ./2016-03-01/CommonDefinitions.json.1 2018-09-09 07:07:44.365565300 +0900
+++ ./2018-02-1/CommonDefinitions.json.1 2018-09-09 07:07:52.212100600 +0900
@@ -1,13 +1,19 @@
{
"swagger": "2.0",
"info": {
- "version": "2016-03-01",
+ "version": "2018-02-01",
"title": "Common Definitions"
},
@takekazuomi
takekazuomi / log.txt
Created Sep 3, 2018
IL Linker result
View log.txt
Before linking (B) After linking (B) Size decrease
----------- ----------- ----------- -----------
Total size of assemblies 44,803,072 25,964,544 42.047%
----------- ----------- ----------- -----------
dotnetapp.dll 8,192 8,192 0.000%
utils.dll 4,608 4,608 0.000%
Microsoft.CSharp.dll 775,680 0 100.000%
Microsoft.VisualBasic.dll 460,800 0 100.000%
Microsoft.Win32.Primitives.dll 10,240 9,728 5.000%
Microsoft.Wi
View chunk.ps1
Task Deploy -depends Archive -description "Deploy functions" -requiredVariables $name {
$container = "content"
$webapp = Get-AzureRmWebApp -Name $name | % {$_}
$h = @{}
$webapp.SiteConfig.AppSettings | % { $h[$_.Name] = $_.Value}
$zip = (Get-ChildItem "$buildDir/*.zip" | Select-Object -Last 1).FullName
$ctx = New-AzureStorageContext -ConnectionString $h["AzureWebJobsStorage"]
New-AzureStorageContainer -Name $container -Permission Off -Context $ctx -ErrorAction SilentlyContinue | Out-Null
$blob = Set-AzureStorageBlobContent -Container $container -BlobType Block -File $zip -Context $ctx -Force
$now = Get-Date
View Program.cs
using System;
using System.Text;
namespace ConsoleApp4
{
class Program
{
static void Main(string[] args)
{
foreach (var encodingInfo in Encoding.GetEncodings())
You can’t perform that action at this time.