Skip to content

Instantly share code, notes, and snippets.

View fliedonion's full-sized avatar

Takahiro KITAHARA fliedonion

View GitHub Profile
@fliedonion
fliedonion / docker-compose.yml
Created July 9, 2020 17:57
rocket.chat 3.4.1 / let's chat docker-compose sample
version: "3"
services:
letschat:
image: sdelements/lets-chat
# image: lets-chat:2020-07-08
links:
- mongo
ports:
- 8080:8080
@fliedonion
fliedonion / appveyor.yml
Last active February 17, 2020 15:06
appveyor.yml for build library
# AppVeyor.yml for Zipped files to XCopy Deploy.
# - Require VS2013 ($env:MSBUILD_EXE)
# - Require 7Zip ($env:szip)
# - "C:\opt\nuget3.4\appveyor_nugetconfig\nuget.config"
# - C:\opt\nuget3.4\nget.exe
# version: 1.0.{build}
# 必要に応じてAssemblyInfoパッチなども行う。このymlを共通で使うならここでバージョンしない方が良いと思う。
configuration: Release
@fliedonion
fliedonion / karabiner.pc-jis-sample.json
Last active April 28, 2019 16:58
karabiner-elements: JIS PCキーボードでVMware fusion除外デバイス指定も絡めたwin-alt置換、caps-rCtrl化、無変換変換かな-英数かな化サンプル
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@fliedonion
fliedonion / SomeFormBase.cs
Created October 7, 2018 13:24
WnForms Control Enable to ignore many clicks during controls were disabling.
namespace net.case_of_t.WinForms {
public class SomeFormBase : Form{
protected static readonly int DefaultWaitMsForTurnEnable = 1000;
protected void ControlsEnableAfter(Control target) {
ControlsEnableAfter(DefaultWaitMsForTurnEnable, target);
}
protected void ControlsEnableAfter(IEnumerable<Control> targets) {
@fliedonion
fliedonion / convert.md
Created October 4, 2018 12:29
Regex for Convert C# Field to Property with INotifyPropertyChanged

Find pattern is like this:
public (.+) (?!PropertyChanged)(.+);

Replace is:

public $1 $2 {
    get { return \l$2; }
    set {
        if(\l$2 != value) {
 \l$2 = value;
@fliedonion
fliedonion / TaskCompletionSourceBasic.cs
Created September 20, 2016 23:41
TaskCompletionSource example.
class Program {
static Task<byte[]> FromWebClient(WebClient wc, Uri address) {
var tcs = new TaskCompletionSource<byte[]>();
wc.DownloadDataCompleted += (object sender, DownloadDataCompletedEventArgs e) => {
if (e.Cancelled)
tcs.SetCanceled();
else if (e.Error != null)
tcs.SetException(e.Error);
@fliedonion
fliedonion / result_sample.elm
Last active November 7, 2017 04:22
hello-elm
import Html exposing (text, h1)
{-
type alias EmailAddress = String
type alias Message =
{ recipient : EmailAddress
, body : String
}
@fliedonion
fliedonion / IconLoader.cs
Last active September 19, 2017 23:51
Load Icon Data From File. Sideline of my other program using UpdateResource.
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
// https://stackoverflow.com/a/36795367
// http://schima.hatenablog.com/entry/20090512/1242139542
// https://blogs.msdn.microsoft.com/oldnewthing/20120720-00/?p=7083
namespace IconLoadToStruct {
@fliedonion
fliedonion / SampleForm1.cs
Last active September 4, 2017 23:48
TextRender-Wrap-sample
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@fliedonion
fliedonion / CheckJavaVersion.cs
Last active July 7, 2017 14:24
Get Java version of specified directory.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
namespace CheckJavaVersion {
class Program {
static void Main(string[] args) {