convert image.png -crop 4x2@ +repage +adjoin image_%d.png
mogrify -transparent '#81797d' *.png
This file contains 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.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() |
This file contains 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
Globals = Alloy.Globals | |
SceneController = require 'common/controllers/scene' | |
class exports.Controller extends SceneController | |
name: Globals.Consts.Scenes.Start | |
events: | |
'click startButton': 'moveToHome' | |
'click optionButton': 'moveToOption' | |
initialize: -> |
This file contains 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
require 'formula' | |
class Misakura < Formula | |
homepage 'https://github.com/shiwano/misakura' | |
url "https://github.com/shiwano/misakura/archive/v0.1.1.tar.gz" | |
sha1 "279035a33ca149815fab153222470c9621d7a7ee" | |
def install | |
bin.install "misakura" | |
end |
This file contains 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
#!/bin/sh | |
if type misakura > /dev/null 2>&1; then | |
if ! cat $1 | grep '^Before translating into Misakura language:' > /dev/null 2>&1; then | |
mv $1 $1.$$ | |
misakurized=`cat $1.$$ | misakura` | |
printf "${misakurized}\n\nBefore translating into Misakura language:\n`sed -e 's/^/\t/g' $1.$$`" > "$1" | |
rm -f $1.$$ | |
fi | |
fi |
This file contains 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 fontforge -script | |
import fontforge | |
font = fontforge.open("enter your font path") | |
font.selection.all() | |
for glyph in font.selection.byGlyphs: | |
print glyph.encoding |
This file contains 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
set theDoc to (path to desktop as text) & "test.xlsx" | |
set outPath to (path to desktop as text) & "test.html" | |
tell application "Microsoft Excel" | |
open file theDoc | |
tell workbook 1 | |
tell sheet 1 | |
save in outPath as HTML file format | |
end tell | |
close without saving |
This file contains 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
interface Product { | |
/** The unique identifier for a product */ | |
id: integer; | |
/** Name of the product */ | |
name: string; | |
/** | |
@minimum 0 | |
@exclusiveMinimum | |
*/ | |
price: number; |
This file contains 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
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') |
This file contains 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
/* | |
<javascriptresource> | |
<name>Generate a sprite from animation frames</name> | |
<category>web</category> | |
</javascriptresource> | |
*/ | |
var AnimationSpriteGenerator, console, main, showInputSizeDialog; | |
console = { |
OlderNewer