Skip to content

Instantly share code, notes, and snippets.

View takeshik's full-sized avatar

Takeshi KIRIYA takeshik

View GitHub Profile

openpgp4fpr:260032D45A1BB80D4662D16E7F0B72A0F5468326

@takeshik
takeshik / default-colors.gitconfig
Last active December 11, 2021 12:24
Default config values of color.* slots (on Git 2.24.1)
[color "branch"]
plain = normal
remote = red
local = normal
current = green
upstream = blue
worktree = cyan # not in doc
[color "diff"]
context = normal
@takeshik
takeshik / keybase.md
Created September 22, 2015 16:56
Keybase proof

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 November 26, 2014 17:10
Fix deserialized property name if the key contains (perhaps) non-ASCII, or XML-element-invalid chars
--- 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))
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 August 29, 2015 13:59
[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)
{
void Main()
{
new Foo().Hoge();
}
public class Foo
{
public void Hoge()
{
using (Log.Start(this))
@takeshik
takeshik / cbo.cs
Last active August 29, 2015 13:55
logging w/ CBO
// license:cc0, free to use.
void Main()
{
var x = new Test();
x.Foo();
x.Bar();
}
[Logging]
@takeshik
takeshik / parseq-new-msg.cs
Last active December 31, 2015 13:29
Parseq new message system
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),
// Yacq
private static readonly Grammar _standard = new Grammar();
public static Grammar Standard
{
get
{
return _standard;
}