Skip to content

Instantly share code, notes, and snippets.

View 44uk's full-sized avatar
♨️
ズイ₍₍(ง˘ω˘)ว⁾⁾ズイ

Yoshiyuki IEYAMA 44uk

♨️
ズイ₍₍(ง˘ω˘)ว⁾⁾ズイ
View GitHub Profile
;(function($) {
"use strict";
$.fn.name_space = function(options) {
var els = this;
var opts = $.extend({
// default option values
}, options);
#!/usr/bin/env ruby
require 'webrick'
srv = WEBrick::HTTPServer.new(
:BindAddress => '127.0.0.1',
:Port => (port = ARGV[0].to_i) == 0 ? 3000 : port,
:DocumentRoot => './'
)
trap(:INT){srv.shutdown}
srv.start
@44uk
44uk / description.md
Last active August 29, 2015 14:27 — forked from mizchi/description.md

ゲームっぽく一文字ずつ文字を表示するメッセージウィンドウ。 メッセージ再生中にクリックで読み飛ばす。

@44uk
44uk / sticky_footer.scss
Created July 5, 2012 13:35
stiky footer
@44uk
44uk / gist:3384755
Created August 18, 2012 06:00
Ruby Class Initialize with attributes
class Hoe
# attr_accessor
def initialize(attributes = nil)
assign_attributes(attributes) if attributes
yield self if block_given?
end
def assign_attributes(new_attributes)
new_attributes.each do |k, v|
$('body').on('click', 'a', function(e) {
e.preventDefault();
$.get($(this).attr('href')).success(function(html) {
$('body').html('');
$('body').append($(html).find('body'));
})
});
@44uk
44uk / git-export-diff-between-revs
Created August 4, 2013 06:52
Export diff files between 2 revisions.
#!/usr/bin/env ruby
#
#= Export diff files between 2 revisions.
#
# export only commited files for SourceTree.
#
#== setup
#
# set this script to cunstom action.
# then, set "$REPO $SHA" in parameters.
/* 先頭行: 他のスクリプトでのセミコロン忘れに備え、且つ、予約語でないundefinedの書換えによる誤動作を防いでいる。*/
;(function($, undefined) {
"use strict";
$.fn.myPlugIn = function(option) {
var a, b, c;
//※未設定のオプション項目に初期値を設定
option = $.extend({
opt1: null,
@44uk
44uk / new_gist_file
Created August 27, 2013 05:45
カントリーコード(2文字)正規表現
(A[CDEFGILMNOQRSTUWZ]|B[ABDEFGHIJMNORSTVWYZ]|C[ACDFGHIKLMNORUVXYZ]|D[JKMOZCEGRST]|F[IJKMOR]|G[ABDEFGHILMNPQRSTUWY]|H[KMNRTU]|I[DELMNOQRST]|J[EMOP]|K[EGHIMNPRWYZ]|L[ABCIKRSTUVY]|M[ACDGHKLMNOPQRSTUVWXYZ]|N[ACEFGILOPRUZ]|OM|P[AEFGHKLMNRTWY]|QA|R[EOUW]|S[ABCDEGHIJKLMNORTUVYZ]|T[CDFGHJKMNOPRTVWZ]|U[AGKMSYZ]|V[ACEINU]|W[FS]|Y[ETU]|Z[AMRZW])
@44uk
44uk / Gruntfile.coffee
Created September 8, 2013 07:29
Gruntfile.coffee を書いてみた
# grunt install grunt-contrib --save-dev
# grunt install grunt-bower-task --save-dev
'use strict'
excludes = [
'!**/.DS_Store'
'!**/Thumbs.db'
'!**/*.coffee'
'!**/*.map'