Skip to content

Instantly share code, notes, and snippets.

@ntk1000
ntk1000 / c# memo
Created September 16, 2013 00:34
c# memo.markdown
foo baa

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
namespace Test
{
[TestClass]
public class BootDayTest

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップで git-flow についてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

@ntk1000
ntk1000 / itunesfix.md
Last active January 2, 2016 07:19
itunesで保存先変えた時にファイル見つからない問題の対処法メモ

概要

音の保存先を外付けHDDにしている ->

HDD一杯になったから新しいのに変える ->

新しいHDDにファイルあるのに!マーク出て認識されない

原因

using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar;
public void CreateGz(string outputFilePath, string inputFilePath)
{
using (FileStream infs = new FileStream(inputFilePath, FileMode.Open, FileAccess.Read))
using (FileStream outfs = new FileStream(outputFilePath, FileMode.Create, FileAccess.Write, FileShare.None))
using (GZipOutputStream gzipStream = new GZipOutputStream(outfs))
{
gzipStream.SetLevel(1);// 圧縮レベル: デフォルト6で遅いので強制的に1にセット
@ntk1000
ntk1000 / file0.cs
Created August 19, 2014 04:06
C#でリモートサーバー上のExeを起動し、戻り値を取得する ref: http://qiita.com/ntk1000@github/items/9569fd0543eebadb53c5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Security;
using System.Configuration;
@ntk1000
ntk1000 / file0.sql
Created September 4, 2014 07:37
PostgreSQLでinfinityのデータを検索する ref: http://qiita.com/ntk1000@github/items/8888e40cfc10b2c47e33
select * from table_name where datetime_column='infinity'::timestamp;
@ntk1000
ntk1000 / aliases
Created November 14, 2014 04:12
cmder/config/aliases
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --color $*
pwd=cd
find=%CMDER_ROOT%\vendor\msysgit\bin\find.exe
which=where $*