This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@(echo "`" >nul & goto :__BATCH__) & rem ") | Out-Null | |
<# | |
:: UAC Elevation & Powershell Launcher | |
:: MIT License (c) Yukio KANEDA | |
:__BATCH__ | |
@if "%~1" neq "/?" call :__MAIN__ %0 %* <nul & exit /b | |
@shift /1 & call :__MAIN__ %0 /h <nul & exit /b | |
:__USAGE__ | |
if not exist %_000%.ps1 ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call :MAIN %* <nul | |
exit /b | |
:MAIN | |
if not exist "%BAT_SH_BAT%" call :AUTO_DETECTOR | |
if not exist "%BAT_SH_BAT%" ( | |
echo sh not found | |
echo please install "Git for Windows" or "MSYS2" or "Visual Studio 2017 later" | |
echo see https://gitforwindows.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call :MAIN %* <nul | |
exit /b | |
:MAIN | |
if not exist "%BAT_CMAKE_BAT%" call :AUTO_DETECTOR | |
if not exist "%BAT_CMAKE_BAT%" ( | |
echo cmake not found | |
echo please install "cmake" | |
echo see https://cmake.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <type_traits> | |
#include <string> | |
template<class T> | |
struct PropertyUtil { | |
// empty base | |
PropertyUtil(const PropertyUtil&) = delete; | |
PropertyUtil(PropertyUtil&&) = delete; | |
PropertyUtil& operator=(const PropertyUtil&) = delete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace property_impl { | |
/// property offset utillity | |
template <class Outer, bool IsStandardLayout = std::is_standard_layout<Outer>::value> | |
struct offset; | |
/// property offset utillity for standard-layout-class | |
template <class Outer> | |
struct offset<Outer, true> { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 動作させる為には | |
' ファイル => オプション => セキュリティーセンター => セキュリティーセンターの設定 | |
' マクロの設定 => "VBAプロジェクトオブジェクトモデルへのアクセスを信頼する" をチェック | |
Sub Hoge() | |
ImportModule ("Fuga") | |
Application.Run "Fuga.Fuga", "aa" | |
End Sub | |
Sub ImportModule(modname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Foo; | |
std::ostream& operator<<(std::ostream& out, const Foo& self); | |
struct Foo : std::string { | |
typedef std::string Base; | |
~Foo() { | |
std::cout << "dtor : " << | |
std::addressof(*this) << | |
" " << *this << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: rem=" | |
@echo off | |
type %~f0 | bash | |
exit /b %ERRORLEVEL% | |
"; | |
echo "aaa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import yaml, collections | |
def represent_odict(dumper, instance): | |
return dumper.represent_mapping('tag:unity3d.com,2011:129', instance.items()) | |
def construct_odict(loader, node): | |
return collections.OrderedDict(loader.construct_pairs(node)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
posix | |
echo "1:`date +%s`:送信者:送信機器:32:メッセージ" | iconv -f utf-8 -t cp932 | nc -w 1 -u 127.0.0.1 2425 | |
win | |
set T=%time::=0% | |
set T=%T:.=0% | |
echo 1:%T%:送信者:送信機器:32:メッセージ | ncat -w 1 -u 127.0.0.1 2425 | |
ipmsg /msg 127.0.0.1 メッセージ |
NewerOlder