Skip to content

Instantly share code, notes, and snippets.

元にしたデータ
https://gist.github.com/wadako111/3fcae2e9d283b60fe707e1db64c724c8
総購入数
> wc -l megabig.csv
15984 megabig.csv
出現数字の偏りはなさそう
@hanabokuro
hanabokuro / g3.js
Last active August 9, 2019 07:11
g(3)
'use strict'
let memo = {}
class B {
static f(n) {
return n + 1
}
static use_memo = false
@hanabokuro
hanabokuro / egg-make-bunsetsu.el
Created December 29, 2018 15:13
egg-make-bunsetsu for emacs 26
(defun egg-make-bunsetsu (backend bunsetsu last)
(let* ((converted (copy-sequence (egg-get-bunsetsu-converted bunsetsu)))
(language (egg-get-converted-language bunsetsu))
(continue (and (null last) (egg-major-bunsetsu-continue-p bunsetsu)))
(face (egg-get-conversion-face language))
len len1 prev-pos)
(setq len1 (length converted))
(or (eq last t)
(setq converted (concat converted
(if continue

ssh client log

debug1: Authentications that can continue: keyboard-interactive
debug3: start over, passed a different list keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
@hanabokuro
hanabokuro / sshd.md
Last active September 14, 2017 07:01
sshd_config

CentOS 7.3 OpenSSH 6.6.1

ChallengeResponseAuthentication yes
UsePAM yes
AuthenticationMethods publickey,keyboard-interactive
$ sudo sshd -t
<?php
class Foo {
static function throw_exception_maybe()
{
if(rand(0, 10) < 3) {
throw new Exception();
}
return 'xxx';
}
var Rx = require('rx')
var source0 =
Rx.Observable.timer(0, 500)
.map(function () {
if(Math.floor(Math.random() * 2) == 0){
return 'ズン'
}else{
return 'ドコ'
}
@hanabokuro
hanabokuro / get-string-region-at-cursor
Created August 18, 2015 06:00
Get region of string under cursor
(defun get-string-region-at-cursor ()
(save-excursion
(let (beg)
(setq beg (nth 8 (parse-partial-sexp 1 (point))))
(if beg
(progn
(goto-char beg)
(forward-sexp)
(list (1+ beg) (1- (point))))
nil)
'use strcit'
var Promise = require('bluebird');
function findUser(id) {
// return Promise.resolve({id: id})
return Promise.reject('not found')
}
var user = findUser(12)
@hanabokuro
hanabokuro / install_plevn.sh
Last active August 29, 2015 14:07
install plenv
sudo git clone https://github.com/tokuhirom/plenv.git /usr/local/plenv
sudo mkdir /usr/local/plenv/plugins
sudo git clone https://github.com/tokuhirom/Perl-Build.git /usr/local/plenv/plugins/perl-build
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install 5.18.2'
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install 5.20.1'
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install-cpanm'