Skip to content

Instantly share code, notes, and snippets.

Takeshi KIRIYA takeshik

View GitHub Profile
@takeshik
takeshik / default-colors.gitconfig
Last active Dec 11, 2019
Default config values of color.* slots (on Git 2.24.1)
View default-colors.gitconfig
[color "branch"]
plain = normal
remote = red
local = normal
current = green
upstream = blue
worktree = cyan # not in doc
[color "diff"]
context = normal
View keybase.md

Keybase proof

I hereby claim:

  • I am takeshik on github.
  • I am takeshik (https://keybase.io/takeshik) on keybase.
  • I have a public key whose fingerprint is 9231 EC22 ED08 0B15 F0B5 231A 4170 FA42 22C3 D324

To claim this, I am signing this object:

@takeshik
takeshik / DynamicJson.patch
Created Nov 26, 2014
Fix deserialized property name if the key contains (perhaps) non-ASCII, or XML-element-invalid chars
View DynamicJson.patch
--- DynamicJson.cs
+++ DynamicJson.fixed.cs
@@ -322,15 +322,17 @@
// Deserialize or foreach(IEnumerable)
public override bool TryConvert(ConvertBinder binder, out object result)
{
if (binder.Type == typeof(IEnumerable) || binder.Type == typeof(object[]))
{
var ie = (IsArray)
? xml.Elements().Select(x => ToValue(x))
View StarryEyes-improve_connection.patch
From b6f08957c1605b441385e6b671f9fdd7b6df9cf4 Mon Sep 17 00:00:00 2001
From: Takeshi KIRIYA <takeshik@xspect.org>
Date: Mon, 14 Jul 2014 09:24:07 +0900
Subject: [PATCH] improve connection
---
StarryEyes.Casket/Cruds/ListUserCrud.cs | 6 +-
StarryEyes.Casket/Cruds/ManagementCrud.cs | 6 +-
StarryEyes.Casket/Cruds/Scaffolding/CrudBase.cs | 74 ++-----------------------
StarryEyes.Casket/Cruds/UserCrud.cs | 2 +-
@takeshik
takeshik / f79ed30-HEAD.patch
Last active Aug 29, 2015
[PATCH] よくわからないが、こうすると落ちなくなる (酷)
View f79ed30-HEAD.patch
StarryEyes/Hotfixes/ViewModelHelperRx.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/StarryEyes/Hotfixes/ViewModelHelperRx.cs b/StarryEyes/Hotfixes/ViewModelHelperRx.cs
index 811f4ed..2efd9c6 100644
--- a/StarryEyes/Hotfixes/ViewModelHelperRx.cs
+++ b/StarryEyes/Hotfixes/ViewModelHelperRx.cs
@@ -77,7 +77,7 @@ namespace StarryEyes
switch (e.Action)
{
View log.cs
void Main()
{
new Foo().Hoge();
}
public class Foo
{
public void Hoge()
{
using (Log.Start(this))
@takeshik
takeshik / cbo.cs
Last active Aug 29, 2015
logging w/ CBO
View cbo.cs
// license:cc0, free to use.
void Main()
{
var x = new Test();
x.Foo();
x.Bar();
}
[Logging]
@takeshik
takeshik / parseq-new-msg.cs
Last active Dec 31, 2015
Parseq new message system
View parseq-new-msg.cs
var reply = Chars.Digit()
.Or(Chars.Any().Message("not a digit"))
.Many()
.Select(cs => new string(cs.ToArray()))
("12a3b".AsStream());
reply.Status.Dump(); // Success
reply.Left.Value.Value.Dump(); // "12a3b"
reply.Messages.Dump();
// [ not a digit (1:5,1:5),
// not a digit (1:3,1:3),
View grammar.cs
// Yacq
private static readonly Grammar _standard = new Grammar();
public static Grammar Standard
{
get
{
return _standard;
}
View a.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Security.Cryptography;
using System.Text;
namespace TinyTweet
You can’t perform that action at this time.