Skip to content

Instantly share code, notes, and snippets.

Ikiru Yoshizaki guitarrapc

Block or report user

Report or block guitarrapc

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
@guitarrapc
guitarrapc / ToUpperSnake.cs
Last active Sep 18, 2019
UpperCamel (Pascal) / smallCamel / smallcase to UPPER_SNAKE case.
View ToUpperSnake.cs
void Main()
{
ToUpperSnake("HogeMoge").Dump();
ToUpperSnake("fugafuga").Dump();
ToUpperSnake("hogeMoge").Dump();
ToUpperSnake("PIYOPIYO").Dump();
ToUpperSnake("PIYO_PIYO").Dump();
ToUpperSnake("PIYO_PIYxO").Dump();
ToUpperSnake("piyo_piyo").Dump();
ToUpperSnake("piyo_piYo").Dump();
@guitarrapc
guitarrapc / ArraySizeChange.cs
Created Sep 11, 2019
array size change in C#
View ArraySizeChange.cs
void Main()
{
// resize
var a = new[] { 1, 2, 3 };
Array.Resize(ref a, a.Length + 1); // 突然のref
a[a.Length - 1] = 4;
a.Dump();
// copy
var b = new[] { 1, 2, 3 };
View base64
aG9nZW1vZ2VmdWdhZnVnYQ==
View Program.cs
using System;
using System.IO;
using TeamsidToBitwardenConverter;
using TeamsidToBitwardenConverter.Lib;
using TeamsidToBitwardenConverter.Model.Bitwarden;
using TeamsidToBitwardenConverter.Model.TeamsId;
namespace TeamsId2BitwardeConsole
{
class Program
@guitarrapc
guitarrapc / MySQLToCsharp.csproj
Last active Aug 29, 2019
circleci config to release to GitHub with .NET Core 3.0 Single Executable-file
View MySQLToCsharp.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
</PropertyGroup>
View GlobalToolSingleExecutable.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<OutputType>Exe</OutputType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
<PackageId>test</PackageId>
<PackageVersion>$(Version)</PackageVersion>
<Authors>guitarrapc</Authors>
@guitarrapc
guitarrapc / Program.cs
Last active Aug 18, 2019
Single Executable with csproj
View Program.cs
using System;
namespace SimpleSingleExecutable
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
View TrySingleExecutable.sh
#!/bin/bash
mkdir SingleFileExe
cd SingleFileExe
dotnet new console
dotnet publish -r win10-x64 --self-contained=false /p:PublishSingleFile=true -o ./bin/out
./bin/out/SingleFileExe.exe
View TrySingleExecutable.ps1
mkdir SingleFileExe
cd SingleFileExe
dotnet new console
dotnet publish -r win10-x64 --self-contained=false /p:PublishSingleFile=true -o ./bin/out
./bin/out/SingleFileExe.exe
You can’t perform that action at this time.