Skip to content

Instantly share code, notes, and snippets.

View taisyo7333's full-sized avatar

Daisuke Inoue taisyo7333

View GitHub Profile
@taisyo7333
taisyo7333 / Tee.ps1
Created August 28, 2015 03:49
PowerShell Tee
# $command : command
# $logfile_path : output file path
Invoke-Expression $command | Tee-Object -FilePath $logfile_path -Append
@taisyo7333
taisyo7333 / timestamp.ps1
Created August 28, 2015 03:46
PowerShell Timestamp
#e.g) 20150828_124340
Get-Date -Format yyyyMMdd_HHmmss
@taisyo7333
taisyo7333 / VS_Build.ps1
Last active August 28, 2015 04:40
VisualStudio BuildScript by powershell
<#
.SYNOPSIS
Build MS project(.sln)
.DESCRIPTION
Build Microsoft Visual Studio project (.sln)
.PARAMETER project
The project file to build.
@taisyo7333
taisyo7333 / vs_build.ps1
Last active August 27, 2015 11:08
Visual Studio -- Build Script by powershell.
$target = 'ソリューション名.sln'
$config = 'Release'
#Rebuild,Build,Clean
$type = 'Rebuild'
$ms_build_path = 'C:\Windows\Microsoft.NET\Framework\v4.0.30319;'
$env:Path = $env:Path + ';' + $ms_build_path
# /m -> concurrent build
#(e.g) MSBuild $target /t:Rebuild /p:Configuration=Release /m
@taisyo7333
taisyo7333 / timer.h
Last active August 29, 2015 14:28
Win32API SetTimer関数のコールバック関数からメンバ関数をコールしたい。
#pragma once
#include "stdafx.h"
// Reference URL
// https://social.msdn.microsoft.com/Forums/ja-JP/1a0354fc-8e7c-4d75-b65e-6e38041b6e5d/c-how-send-the-class-pointer-with-settimer-function?forum=vclanguage
class Timer
{
public:
Timer()
@taisyo7333
taisyo7333 / .gitconfig
Created August 20, 2015 04:27
SourceTree / git で WinMerge を diff , mergeに使いたい。
[merge]
tool = WinMerge
[mergetool "WinMerge"]
cmd = \"C:/Program Files/WinMerge/WinMergeU.exe\" //e //u //wl //wr \"$LOCAL\" \"$BASE\" \"$REMOTE\" //o \"$MERGED\"
trustExitCode = true
[diff]
guitool = winmerge
[difftool "winmerge"]
path = C:/Program Files/WinMerge/winmergeu.exe
cmd = \"C:/Program Files/WinMerge/winmergeu.exe\" -e -u \"$LOCAL\" \"$REMOTE\"
@taisyo7333
taisyo7333 / .gitconfig
Created August 20, 2015 04:25
My .gitconfig
[merge]
tool = WinMerge
[mergetool "WinMerge"]
cmd = \"C:/Program Files/WinMerge/WinMergeU.exe\" //e //u //wl //wr \"$LOCAL\" \"$BASE\" \"$REMOTE\" //o \"$MERGED\"
trustExitCode = true
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/kdiff3.exe
[diff]
guitool = winmerge
[difftool "kdiff3"]
@taisyo7333
taisyo7333 / parse_calculator.cpp
Created July 31, 2015 15:12
C++ 四則演算を再帰下降構文解析する
#include<string>
#include<iostream>
// arg1 : 評価する式
// arg2 : 式の参照位置
// return : std::pair<構文解析結果,次の参照位置>
using RESULT = std::pair < int, size_t > ;
RESULT expr(const std::string&, size_t);
RESULT term(const std::string&, size_t);
RESULT factor(const std::string&, size_t);
@taisyo7333
taisyo7333 / Translate.hs
Last active August 29, 2015 14:25
translate InFix notation into PostFix notation.
module Translate
( toPostFix
, translate
) where
import Data.Char
import qualified Data.Map as Map
-- ("operator",priority)
operators = Map.fromList [ ("+",1)
@taisyo7333
taisyo7333 / output_sample.txt
Last active August 29, 2015 14:25
Haskell : RoutePath Sample
>runhaskell RoutePath.hs < paths.txt
The best path to take is : BCACBBC
Time taken: 75