Skip to content

Instantly share code, notes, and snippets.

View htsign's full-sized avatar
🤔

htsign htsign

🤔
View GitHub Profile
@tyru
tyru / list-func.vim
Last active March 3, 2020 05:57
fold() and flatmap() implementation in Vim script
function! s:fold(list, f, init) abort
let ref = {'result': a:init}
return map(copy(a:list), {_,v -> extend(ref, {'result': a:f(ref.result, v)})})[-1].result
endfunction
function! s:fold2(list, f, init) abort
let l = a:list + [a:init]
let end = len(a:list)
return map(l, {i,v -> i is# end ? l[i-1] : a:f(l[i-1], v)})[-1]
endfunction
@melpon
melpon / wandbox-sponsors.md
Last active March 2, 2022 05:31
Wandboxのスポンサー募集(締め切りました)

スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。

どのような募集をしていたか知りたい場合は履歴を確認してください。

@sardell
sardell / flatten.js
Created August 1, 2016 19:33
Flatten Nested Array with ES2015
// This example uses ES2015 features. Use Babel to compile down to JS, or see the example at http://codepen.io/sardell/pen/VjGYRz
// example array provided
var example = [[1,2,[3]],4];
function flatten_array(nested) {
// concatenate using the spread operator
const flat = [].concat(...nested)
// repeat flatten_array function until nested array is flat
return flat.some(Array.isArray) ? flatten_array(flat) : flat;
@jfmengels
jfmengels / lodash-fp-documentation.md
Last active February 6, 2024 20:57
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@t-nissie
t-nissie / 00OCaml.md
Last active December 29, 2020 14:16
OCaml練習帳

OCaml練習帳

OCamlを自習する。 浅井健一著『プログラミングの基礎』とそのWebサイト http://pllab.is.ocha.ac.jp/~asai/book-mov/ を使う。

インストール

UTF-8で漢字の入出力に対応させるのがわりと面倒。

Ubuntu 14.04 LTSへのインストール

UbuntuなどDebian系のGNU/Linuxにはapt-getで簡単にインストールできる:

@sgur
sgur / HowToUseFishOnMsys2.md
Last active April 10, 2018 12:16
MSYS2で fish を動作するようにするまで

1. msys2 で fish のインストール

pacman -S fish
pacman -S man

2. /usr/etc/fish/config.fish の編集

if status --is-login の条件内に以下のコードを追加 (/etc/profile と同様にパスを設定) する。

@sgur
sgur / corvusskk-egg-like-symbols-map.txt
Last active December 13, 2022 23:49
Corvus SKK のローマ字・かな変換テーブルにEGGライク(SKKFEP同等)な記号入力を追加 (日本語配列用)
a あ ア ア 0
i い イ イ 0
u う ウ ウ 0
e え エ エ 0
o お オ オ 0
ka か カ カ 0
ki き キ キ 0
ku く ク ク 0
ke け ケ ケ 0
ko こ コ コ 0
@voluntas
voluntas / webrtc.rst
Last active June 27, 2024 02:25
WebRTC コトハジメ
@walkure
walkure / HTTProxy.cs
Created September 12, 2015 13:00
HttpListenerを使ってFiddlerCoreを代替してみた http://www2.hatenadiary.jp/entry/2015/09/12/220008
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Net;
using System.IO;
using System.Threading;
namespace KCB2

Aristea shortcut cheat sheet

global

stroke behavior
Ctrl+N New tweet
Ctrl+F Search tweet

compose