Skip to content

Instantly share code, notes, and snippets.

View hqf00342's full-sized avatar

tnaga hqf00342

  • Tokyo, Japan
View GitHub Profile
@hqf00342
hqf00342 / sendmailattach.py
Created December 15, 2021 02:08
awsのSESを使った添付ファイル送信プログラム
#!/bin/env python3
# sendmailattach.py TO FROM SUBJECT BODY ATTACH_FILENAME
# TO = 送信先メールアドレス
# FROM = 送信元
# SUBJECT = 題名
# ATTACHMENT = 添付ファイル名
# BODY_TEXT = 本文
import sys
@hqf00342
hqf00342 / TextboxDialog.linq
Last active October 11, 2023 17:32
Linqpad multiline textbox dialog
// TextboxDialog for LINQPad
// You can use it anywhere by adding the following code to MyExtensions class on Linqpad6.
// Usage:
// var lines = MyExtensions.ReadLines()
// foreach (var line in lines)
// Console.WriteLine(line);
public static class MyExtensions
{
// Write custom extension methods here. They will be available to all queries.
syntax on
set number
set autoindent
set smartindent
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch "highlight ()"
#!/bin/sh
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
#sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
#sudo docker container run hello-world
#!/bin/sh
sudo yum remove -y docker docker-common docker-selinux docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
yum list docker-ce --showduplicates | sort -r
sudo yum -y install docker-ce
sudo systemctl start docker
sudo systemctl enable docker
@hqf00342
hqf00342 / DatagridStyle.xaml
Created September 4, 2015 03:21
Style for wpf Datagrid
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--DataGrid用のスタイル-->
<Style TargetType="DataGrid">
<!-- Make the border and grid lines a little less imposing -->
<Setter Property="BorderBrush" Value="#DDDDDD" />
<Setter Property="HorizontalGridLinesBrush" Value="#DDDDDD" />
<Setter Property="VerticalGridLinesBrush" Value="#DDDDDD" />
<Setter Property="RowStyle">
@hqf00342
hqf00342 / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hqf00342
hqf00342 / EnumPCCategory2
Last active January 21, 2019 05:08
パフォーマンスカウンターの全カテゴリーを取得
/// <summary>
/// パフォーマンスカウンターのカテゴリーリストを表示
/// 値も表示
/// Excelで処理しやすいように1行に全部表示
/// </summary>
static void EnumPCCategory2()
{
//参考
//http://uchukamen.com/Programming2/PerfMeter2/