sudo apt-get install exfat-fuse exfat-utils
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 URI | |
class Generic | |
alias :__path__ :path | |
def path | |
URI.decode_www_form_component(__path__, Encoding.find("locale")) | |
end | |
end | |
def self.parse(uri) | |
uri = URI.encode_www_form_component(uri) |
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 ruby | |
require "gtk2" | |
window = Gtk::Window.new | |
window.title = "Image Viewer sample" | |
window.set_default_size(640, 480) | |
window.signal_connect("destroy") do | |
Gtk.main_quit | |
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
require "gosu" | |
module ZOrder | |
Background, Block, Bar, Ball, Message = *0..5 | |
end | |
module Util | |
def draw_square(window, x1, y1, x2, y2, color, z_order=0) | |
window.draw_quad(x1, y1, color, | |
x2, y1, color, |
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 "gosu" | |
module Persosta | |
module ZOrder | |
Background, Ball, Bat = *0..2 | |
end | |
module Base | |
def draw_square(window, x1, y1, x2, y2, color, z_order=0) | |
window.draw_quad(x1, y1, color, |
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 ruby | |
require "webkit-gtk2" | |
uri = ARGV[0] | |
window = Gtk::Window.new | |
window.signal_connect("destroy") do | |
Gtk.main_quit | |
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
#!ruby | |
# | |
# This program is licensed under the MIT license. (c) 2014 Masafumi Yokoyama | |
# | |
require "gosu" | |
module Tetris | |
SCALE = 20 |
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 "gtk3" | |
require "bricks_meet_balls" | |
class GameButton < Gtk::Button | |
PROPERTIES = [ | |
"num_of_rows", | |
"num_of_columns", | |
"num_of_balls", | |
"ball_images", | |
"brick_images", |
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 "gosu" | |
require "shogi" | |
require "socket" | |
module RbShogi | |
PIECES = [ | |
"FU", "TO", | |
"KY", "NY", | |
"KE", "NK", | |
"GI", "NG", |
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 "gosu" | |
module GosuImageViewer | |
class Window < Gosu::Window | |
def initialize(width=640, height=480) | |
super(width, height, false) | |
self.caption = "Image Viewer using Gosu" | |
@images = [] | |
@scale = 1.0 | |
@angle = 0 |
OlderNewer