Skip to content

Instantly share code, notes, and snippets.

@223n
223n / BoxStarter-RunScript.txt
Last active February 19, 2019 13:13
DESKTOP-JABS0KH用のGitStarterスクリプト
Install-BoxstarterPackage -PackageName "https://gist.githubusercontent.com/223n/8d0199b91ea6c5ff23f8f90d39df3afd/raw/3b9adf26052a2c5303aa16436162de1e9b3915a2/DESKTOP-JABS0KH_GitStarterScript.txt" -DisableReboots
@223n
223n / win10_Autounattend.xml
Created November 23, 2018 13:09
win10_Autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing />
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
@223n
223n / UsersContoller.cs
Last active June 17, 2018 10:09
コントローラの作成例
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
namespace SampleProject.Controllers
{
[Route("api/[controller]")]
public class UsersController : Controller
{
@223n
223n / Context.cs
Last active June 17, 2018 10:03
DbContextを継承したクラスの実装例
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
namespace SampleProject.Models
{
public class Context : DbContext
{
public Context() { }
@223n
223n / license-badges.md
Created May 8, 2018 08:07 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@223n
223n / dmesg.log
Last active February 3, 2018 02:41
[ 0.000000] Linux version 4.9.0-5-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.9.0-5-amd64 root=/dev/mapper/ja223n--vg-root ro quiet
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
@223n
223n / code.py
Created May 24, 2017 14:02
Python3で指定したフォルダのサイズをry
import os
def get_size(start_path = '.'):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
for f in filenames:
fp = os.path.join(dirpath, f)
total_size += os.path.getsize(fp)
return total_size
print(get_size(start_path = '\\\\fileServer1\\documents'))
@223n
223n / code.cpp
Created May 24, 2017 14:00
C++で指定したフォルダのサイズを求めようとしていた
#include "stdafx.h"
#include <iostream>
#include <string>
#include <filesystem>
using namespace std;
using namespace std::tr2::sys;
void getFoldersize(string rootFolder,unsigned long long & f_size)
{
path folderPath(rootFolder);
@223n
223n / code.go
Created May 24, 2017 13:58
Goで指定したフォルダのサイズを求めようとしていた
package main
import (
"fmt"
"os"
"path/filepath"
)
@223n
223n / コード1.ps
Created May 24, 2017 13:56
PowerShellでフォルダ内のサイズを求めるやつ
function Get-SharedFolders
{
[CmdletBinding()]
param
(
[parameter(
position = 0,
mandatory = 1,
valuefrompipeline = 1,
valuefrompipelinebypropertyname = 1)]