Skip to content

Instantly share code, notes, and snippets.

@felinebabies
felinebabies / call.py
Last active October 1, 2018 16:45
pythonの自作モジュールインポート
import helloworld
helloworld.hello()
@felinebabies
felinebabies / counter.html
Last active December 24, 2017 23:13
聖晶石カウンタ
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>聖晶石カウンタ</h1>
<p>
あなたが今まで石に費やした金額は、<?= fgoStonePriceCounter(); ?>円です。
</p>
@felinebabies
felinebabies / chatlog.rb
Created December 20, 2017 12:28
古いチャットログを解析
input_lines = $stdin.read.split("\n")
linecount = input_lines[0].to_i
chatlines = input_lines[1..-1]
chatarr = chatlines.map do |item|
item.split(" ")
end
@felinebabies
felinebabies / tutu.rb
Created December 11, 2017 12:59
筒の中のボール
ballCount, ballInput = $stdin.read.split("\n")
ballCount = ballCount.to_i
tube = []
ballCount.times do |i|
ballNum = i + 1
ballDirection = ballInput[i]
if ballDirection == "L"
@felinebabies
felinebabies / cat_list_downloader.rb
Created August 5, 2017 10:33
ねこのイラストを一括ダウンロードしてくるやつ
# coding: utf-8
require "nokogiri"
require "open-uri"
require "uri"
INDEXPAGEURL = "http://illustrain.com/?cat=19"
SAVEDIR = "./download"
html = open(INDEXPAGEURL).read
@felinebabies
felinebabies / main.rb
Created December 10, 2016 18:24
猫の里親募集一覧の写真を取得するスクリプト
require "nokogiri"
require "open-uri"
require "erb"
require "base64"
TARGETURL = "http://www.city.yokohama.lg.jp/kenko/hokenjo/genre/douai/joto/jotoinfo-cat.html"
dochtml = open(TARGETURL, "r:CP932").read
doc = Nokogiri::HTML.parse(dochtml)
@felinebabies
felinebabies / deploytogithubpages.rb
Created August 29, 2016 17:00
middlemanのビルド結果をgithubpages用ブランチにミラーリングしてtortoisegitのコミット画面を開く
# coding: utf-8
require 'bundler'
Bundler.require
Dotenv.load
currentdir = File.dirname(__FILE__)
builddir = File.join(currentdir, "build")
@felinebabies
felinebabies / rakefile.rb
Created January 19, 2016 14:31
Opalでrubyスクリプトをjavascriptにコンパイルする
require 'rake/clean'
SRCDIR = './src'
DESTDIR = './dest'
SRCS = FileList[SRCDIR + "/**/*.rb"]
JSS = SRCS.ext('js')
directory DESTDIR
# 出力先パスに書き換え
@felinebabies
felinebabies / EnemyManager.cs
Created January 10, 2016 03:32
敵出現管理
using UnityEngine;
using System.Collections;
public class EnemyManager : MonoBehaviour {
public GameObject enemyPrefab;
// Use this for initialization
void Start () {
StartCoroutine(enemyGenerateSchedule());
}
require 'rake'
files = FileList["**/*.png"]
files.each do |f|
headName = f[0..23]
footName = f[-4,4]
fileNumber = f[24..-5]