Skip to content

Instantly share code, notes, and snippets.

View saihoooooooo's full-sized avatar
♨️
noop

shinya.saiho saihoooooooo

♨️
noop
View GitHub Profile
@saihoooooooo
saihoooooooo / ccc.js
Last active December 26, 2015 18:19
cookie clicker cheats.
// 自動クリック
var timer = setInterval(function(){Game.ClickCookie();}, 4);
// ゴールデンクッキーのポップ
Game.goldenCookie.minTime = 0; Game.goldenCookie.spawn(); Game.goldenCookie.click();
// ゴールデンクッキーの効果
Game.goldenCookie.choose=function() { var list=['blood frenzy', 'click frenzy']; if (Game.goldenCookie.last!='' && list.indexOf(Game.goldenCookie.last)!=-1) list.splice(list.indexOf(Game.goldenCookie.last),1); var choice=choose(list); return choice; }
@saihoooooooo
saihoooooooo / operator-search.vim
Created October 25, 2013 02:37
vim-operator-searchの残骸
map <SPACE>/ <Plug>(operator-search-forward)
map <SPACE>? <Plug>(operator-search-backward)
call operator#user#define('search-forward', 'OperatorSearch2', 'call OperatorSearchForward()')
call operator#user#define('search-backward', 'OperatorSearch2', 'call OperatorSearchBackward()')
let s:command_type = ''
function! OperatorSearchForward()
let s:command_type = '/'
endfunction
@saihoooooooo
saihoooooooo / airline_setting.vim
Created September 17, 2013 04:45
airline create example
call airline#parts#define_function('fenc', s:SID() . 'AirlineFenc')
function! s:AirlineFenc()
return &fileencoding != '' ? &fileencoding : &encoding
endfunction
call airline#parts#define_function('bomb', s:SID() . 'AirlineBomb')
call airline#parts#define_condition('bomb', '\&bomb == 1')
function! s:AirlineBomb()
return 'BOM'
endfunction
call airline#parts#define_function('ff', s:SID() . 'AirlineFF')
@saihoooooooo
saihoooooooo / .vimrc.minimal
Last active December 23, 2015 00:09
Minimal .vmrc for plugin issues.
set nocompatible
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
endif
call neobundle#rc('~/.vim/bundle')
NeoBundle 'foo/baa'
filetype plugin indent on
@saihoooooooo
saihoooooooo / noot_cron.coffee
Last active December 22, 2015 00:01
node-cron in hubot.
# Description:
# No overtime by node-cron.
cron = require('cron').CronJob
random = require('hubot').Response::random
module.exports = (robot) ->
new cron '0 0 18 * * 1-5', () ->
say = '定時退社の時間になりました。' + random [
@saihoooooooo
saihoooooooo / mkhash.rb
Last active December 21, 2015 12:58
Make random hash string.
#!/usr/bin/env ruby
if ARGV.empty?
puts 'plz input length.'
exit
end
len = ARGV[0].to_i
# candidates = ('0'..'9').to_a + ('a'..'z').to_a + ('A'..'Z').to_a
@saihoooooooo
saihoooooooo / CustomFieldFunction.java
Last active December 20, 2015 01:49
MySQL's field() function in Solr.
package jp.co.hogehoge.function;
import java.io.IOException;
import java.util.*;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.queries.function.FunctionValues;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
public class CustomFieldFunction extends ValueSource
@saihoooooooo
saihoooooooo / val_hook.txt
Created July 10, 2013 02:21
solrの_val_フック
[2013/06/03 17:42:20] サイホー: _val_フックはただのスコア調整でした
[2013/06/03 17:42:51] サイホー: q=title_name:キングダム だと同一巻のスコアが全部同じになるけど
[2013/06/03 17:43:22] サイホー: q=title_name:キングダム+_val_:vol_no ってやると巻番号が多いものがスコアが大きくなる
@saihoooooooo
saihoooooooo / vuild.sh
Last active December 18, 2015 23:49
shellscript for vim build.
#!/bin/sh
# vim:set sts=2 sw=2 tw=0 et:
./configure \
--prefix=/usr/local \
--with-features=huge \
--enable-multibyte \
--enable-luainterp \
--with-luajit \
--enable-fail-if-missing && make && make install
@saihoooooooo
saihoooooooo / cdkb.sh
Created June 25, 2013 07:39
チェケ
#!/bin/bash
minute=`date "+%M"`
second=`date "+%S"`
if [ ${minute} -lt 5 ]; then
echo "オレ ホンキ デナイ タスケテ"
else
m=`expr 59 - ${minute}`
s=`expr 60 - ${second}`