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 MapLoader | |
TYPES = [ GameMap::COL_FULL, | |
GameMap::COL_LEFT, | |
GameMap::COL_RIGHT, | |
GameMap::COL_UP, | |
GameMap::COL_DOWN, | |
GameMap::COL_NO, | |
GameMap::COL_LEFT_RIGHT, | |
GameMap::COL_LEFT_UP, | |
GameMap::COL_LEFT_DOWN, |
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 'optparse' | |
module RLE | |
class << self | |
def use_flag(val) | |
@flag = val | |
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
static VALUE | |
init_sock(sock, fd) | |
VALUE sock; | |
int fd; | |
{ | |
OpenFile *fp; | |
MakeOpenFile(sock, fp); | |
fp->f = rb_fdopen(fd, "rw"); | |
fp->f2 = fp->f; // rb_fdopen(fd, "w"); |
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 'net/ftp' | |
Joyau::Wlan.init # Init PSP inet module, ... | |
Joyau::Wlan.connect(2, 60) # Connect to the second access point (the connection will timeout after 60 seconds) | |
open("http://www.google.com") do |file| # Download Google's index, using a standard function | |
puts file.read # Print its content into stdout. | |
end | |
Joyau::Wlan.stop |
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
static void | |
io_fflush(f, fptr) | |
FILE *f; | |
OpenFile *fptr; | |
{ | |
int n; | |
if (!rb_thread_fd_writable(fileno(f))) { | |
rb_io_check_closed(fptr); | |
} |
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
class Grid | |
class << self | |
alias :rand :new | |
end | |
def initialize(width, height) | |
@w, @h = width, height | |
@answer = (0..@h).inject([]) do |ary, x| | |
ary << (0..@w).inject([]) do |sub_ary, y| |
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 'joyget' | |
Joyget.init | |
Joyget.input = Joyget::Input.new | |
Joyget.cursor = Joyau::Cursor.new("cursor.png", 20) | |
widget = Joyget::TabWidget.new do |tabs| | |
3.times do |i| | |
tab = Joyget::ButtonGroup.new("Compression for #{i}") do |group| |
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
# -*- coding: utf-8 -*- | |
# La ligne précédente EST importante. | |
require 'scripts/alias' | |
require 'scripts/last_nicks' | |
# Changez cette ligne par le n° de votre point d'accès. Utilisez 1 | |
# pour le premier, deux pour le second, trois pour le troisième, etc. | |
access_id 1 |
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 'scripts/alias' | |
require 'scripts/last_nicks' | |
# Changez cette ligne par le numero de votre point d'acces. Utilisez 1 | |
# pour le premier, deux pour le second, trois pour le troisieme, etc. | |
access_id 2 | |
# Inserez dans la ligne suivante la liste de vos nicks (pseudonymes) | |
# separes par des espaces. | |
usual_nicks = %w(Frist_Nick Second_Nick Third_Nick) |
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 'scripts/alias' | |
require 'scripts/last_nicks' | |
config_name = "" # => ICI, le nom du point d'acces entre les guillemets | |
access_id(Joyau::Wlan.configs.map { |i| i[1] }.index(config_name) + 1) | |
# Inserez dans la ligne suivante la liste de vos nicks (pseudonymes) | |
# separes par des espaces. | |
usual_nicks = %w(Frist_Nick Second_Nick Third_Nick) # => ICI, les nicks |
OlderNewer