Skip to content

Instantly share code, notes, and snippets.

View seisuke's full-sized avatar

Yoshida Seisuke seisuke

View GitHub Profile
@KnightMiner
KnightMiner / Lua.md
Last active April 29, 2020 15:25
Into the Breach 1.2 Changes
  • localizations
    • Game now contains localizations for all English text to support other languages
    • Many other files were modified to replace localizations with localization keys
      • missions, corporations.lua, pawns.lua, pilots.lua, squads.lua, structures.lua, text_population.lua, weapons_deploy.lua
    • No one has determined yet if custom localizations can be added
  • animations.lua
    • Mech animations height is now GetMechColorsInTexture() instead of GetColorCount()
      • This means the two functions can be overridden sepearately to give a different color list for animations and the UI
    • New animations: Selected_Left, Selected_Up, Selected_Down, and Selected_Right
      • Appear to be gamepad resources
@mchambers
mchambers / reflect.swift
Last active March 5, 2021 09:20
Basic Reflection in Swift.
// Let's define a basic Swift class.
class Fruit {
var type=1
var name="Apple"
var delicious=true
}
// We can get at some info about an instance of an object using reflect(), which returns a Mirror.
reflect(Fruit()).count
reflect(Fruit())[1].0
@rummelonp
rummelonp / percol_zsh.md
Created December 7, 2012 15:57
percol 入れて zsh と組み合わせたら超便利

percol 入れて zsh と組み合わせたら超便利

だったので紹介

percol とは

percol は入力の1行を1候補として,部分一致かつ AND 検索で絞り込みし,選択した候補を出力するコマンドです.端的に言えば Emacs の anything.el のコマンド版です.
@satococoa
satococoa / migrate_one_to_two.rb
Created November 21, 2012 01:45
RubyMotion でシンプルな CoreData のマイグレーションを行うコード
module MigrateOneToTwo
module_function
def store_path
File.join(App.documents_path, 'store.sqlite')
end
def tmp_store_path
File.join(App.documents_path, 'store_tmp.sqlite')
end
@alexspeller
alexspeller / source_maps.rb
Created September 16, 2012 00:03
Coffeescript Source Maps in Rails
# config/initializers/source_maps.rb
if Rails.env.development?
require 'open3'
module CoffeeScript
class SourceMapError < StandardError; end;
class << self
def map_dir
@rfkm
rfkm / emacs.rb
Last active May 3, 2016 01:58
Emacs24.4 Formula with inline-patch
require "formula"
class Emacs < Formula
homepage "https://www.gnu.org/software/emacs/"
stable do
url "http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.xz"
mirror "https://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.xz"
sha256 "47e391170db4ca0a3c724530c7050655f6d573a711956b4cd84693c194a9d4fd"
@scotttam
scotttam / apns.rb
Created January 31, 2012 15:51
Sends an Apple Push Notification with Ruby
require "rubygems"
require "yajl"
require "openssl"
require "socket"
device_token = '39cac56f 986a0e66 3c4fd4f4 68df5598 024d2ca3 8b9f307c 741c180e 9fc30c62'
device_token = device_token.gsub(" ", "")
the_byte_token = [device_token].pack("H*")
file = File.open("ruby_the_byte_token", "wb")
@tily
tily / scaling_isomorphic_javascript_code.ja.markdown
Last active May 1, 2023 09:03
サバクラ両方で動く JavaScript の大規模開発を行うために

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。