Skip to content

Instantly share code, notes, and snippets.

View shiwano's full-sized avatar
💭
😇

Shogo Iwano shiwano

💭
😇
View GitHub Profile
@shiwano
shiwano / error.log
Created June 12, 2012 01:55
vimproc error on vitalize branch
Error detected while processing function neobundle#installer#install..<SNR>98_install..
<SNR>98_sync..<SNR>98_system..<SNR>100_system..vimproc#system..<SNR>92_system..vimproc#
pgroup_open..<SNR>92_pgroup_open..vimproc#plineopen3..<SNR>92_plineopen..<SNR>92_conver
t_args..vimproc#get_command_name:
line 16:
E121: Undefined variable: s:Filepath
E116: Invalid arguments for function vimproc#util#substitute_path_separator( s:Filepath
.which(command, path)), '//', '/', 'g'), '\n')
E116: Invalid arguments for function substitute(vimproc#util#substitute_path_separator(
s:Filepath.which(command, path)), '//', '/', 'g'), '\n')
@shiwano
shiwano / _grab.scss
Created July 21, 2012 12:41
grab cursor scss mixins
@charset "UTF-8";
@mixin grab-cursor {
// http://www.google.com/intl/en_ALL/mapfiles/openhand.cur
cursor: url('data:image/vnd.microsoft.icon;base64,AAACAAEAICACAAcABQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAAAEAAAAAAAAAAAAAAgAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8AAAA/AAAAfwAAAP+AAAH/gAAB/8AAA//AAAd/wAAGf+AAAH9gAADbYAAA2yAAAZsAAAGbAAAAGAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////gH///4B///8Af//+AD///AA///wAH//4AB//8AAf//AAD//5AA///gAP//4AD//8AF///AB///5A////5///8='), all-scroll;
// cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
@shiwano
shiwano / animation_sprite_generator.jsx
Created September 11, 2012 11:52
Generate a sprite from animation frames
/*
<javascriptresource>
<name>Generate a sprite from animation frames</name>
<category>web</category>
</javascriptresource>
*/
var AnimationSpriteGenerator, console, main, showInputSizeDialog;
console = {
(function () {
function sleep(time) {
var d1 = new Date().getTime();
var d2 = new Date().getTime();
while(d2 < d1 + time) {
d2 = new Date().getTime();
}
return;
}
@shiwano
shiwano / vimgirl.txt
Last active April 25, 2017 06:55
Vim Girl の AA。 等幅。M+フォントかM+フォント合成フォントでの閲覧推奨。
メ __-─-,-- _
,イ >:::::::::::< ヽ〟
ヽ─イ /,::::,::::::::\ >─r
ヾ〟//:!:::ハ::::::|:!:ヽ ,丿
ソ r:リヤ ハ::::::ハ:ハ::|rヘ〟
Ⅲ:|:| V―ヘ::::/-ル゙|/ ハリ\ あらぶる
!|:ハ:|,-=〟ヽ/,-=.ソハリ H Vim の
!ヽriゾUソゾ "ハUソノ゙hNノソ ぽーず♡
|!ハヾヾ` `´ノlリ´
ノ:ノハ ハ 丶 クハ ____
@shiwano
shiwano / vim_centos.sh
Last active December 16, 2015 17:19 — forked from fundon/vim_centos.sh
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
javascript:(function(){document.styleSheets[1].addRule('#cookieShower','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/cookieShower3.png") !important');document.styleSheets[1].addRule('#bigCookie','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/nakachan.png")');document.styleSheets[1].addRule('.cookieParticle','background-image:url("https://dl.dropboxusercontent.com/u/34494006/cookie_clicker/small_steels.png")');})();
Process: MacVim [3688]
Path: /Applications/MacVim.app/Contents/MacOS/MacVim
Identifier: org.vim.MacVim
Version: 7.4 (20131023)
Code Type: X86-64 (Native)
Parent Process: launchd [252]
Date/Time: 2013-10-24 12:29:34.989 +0900
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9
@shiwano
shiwano / weighted_random_choice.coffee
Last active August 29, 2015 13:56
weighted random choice
module.exports = class WeightedRandomChoice
constructor: (args) ->
@_weightPairs = _.sortBy _.pairs(args), (pair) -> pair[1]
@sum = _.reduce @_weightPairs, ((memo, pair) -> memo + pair[1]), 0
check: (num, weight) -> num - weight <= 0
random: -> _.random 1, @sum
select: ->
num = @random()
@shiwano
shiwano / imagemagick_memo.md
Last active August 29, 2015 13:56
imagemagick memo
  • convert image.png -crop 4x2@ +repage +adjoin image_%d.png
  • mogrify -transparent '#81797d' *.png