2019-03-11 gorilla.vim #2
This file contains hidden or 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
open Microsoft.Extensions.Configuration | |
/// Builds a configuration source from raw JSON. | |
let configSourceFromJson (json:string) : IConfigurationSource = | |
{ new IConfigurationSource with | |
member this.Build (builder:IConfigurationBuilder) = | |
{ new ConfigurationProvider() with | |
member this.Load() = | |
this.Data <- Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string,string>> json | |
} :> IConfigurationProvider |
This file contains hidden or 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
module HelloExcelSplit | |
open ExcelDna.Integration | |
let splitIndex (group: int) (total: int): seq<seq<int>> = | |
let d = total / group | |
let m = total % group | |
let counts = seq { for i in 0 .. group - 1 do yield d + if i < m then 1 else 0 } | |
let (_, xs) = Seq.fold (fun (a, xs) x -> (a + x, Seq.append xs (Seq.singleton (seq { a .. a + x - 1 })))) (0, Seq.empty) counts | |
xs |
This file contains hidden or 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/gawk -f | |
BEGIN{ | |
RS="\r\n" | |
FPAT="[^,]+|\"[^\"]+\"" | |
OFS= " --> " | |
} | |
{ | |
gsub(/\n/, "<LF>", $0); | |
print $1, $2, $3 |
Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
This file contains hidden or 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
# Useful for com.apple.HIToolbox.plist for configuration of input types, amongst other things | |
from Foundation import NSBundle | |
import objc | |
HIToolbox_bundle = NSBundle.bundleWithIdentifier_("com.apple.HIToolbox") | |
HIT_functions = [ | |
('TISCreateInputSourceList','@@B'), | |
('TISGetInputSourceProperty', '@@@'), |
この記事は ラブライブ! Advent Calendar 2016 の8日目の記事です。
7日目の記事はnanikanaさんの ある野外フェスでその曲を聴くということについて - ただ春を待つ でした。3rdライブでの僕今大合唱は今でも鮮明に覚えています。私も号泣しながら歌っていました。僕光も1日目のライブビューイングでは歌うどころではなかったしその気もなかったですが、2日目現地では2番から歌っていました。いつかまたμ'sが歌う僕光を生で聴けることを願っています。
タイトルに反して別に深い考察とかはないです。いわゆる「誕生日問題」をμ'sとAqoursに当てはめて遊んでみました。
This file contains hidden or 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
//================================================================================ | |
// 共通 | |
//================================================================================ | |
type EmailAddress = | |
{ EAValue: string } | |
type SurfaceAddress = | |
{ SAValue: string } | |
type Customer = |
This file contains hidden or 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 | |
# coding: utf-8 | |
''' | |
auto switch keyboard between different applications | |
if you want to change the app list, modify the var 'ignore_list' | |
一定要用系统自带的 python, 用 brew 或其他方式安装的 python 不能识别 AppKit 等模块,花了很长时间在 pyobjc 的文档中看到这样一句话: | |
The system version of Python (``/usr/bin/python``) includes a copy of | |
PyObjC starting at MacOSX 10.5 ("Leopard"). Installing other versions |
This file contains hidden or 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 bash | |
# 参考サイト: http://tukaikta.blog135.fc2.com/blog-entry-224.html | |
# ================各種設定================ | |
# ダウンロードするファイル (GNU 日本語man) | |
# | |
# http://linuxjm.sourceforge.jp/ からダウンロードするファイルを指定します。 | |
#export GNUJMAN=man-pages-ja-20120915.tar.gz | |
#export GNUJMAN=man-pages-ja-20150315.tar.gz |
NewerOlder