Skip to content

Instantly share code, notes, and snippets.

View tuki0918's full-sized avatar
🏠
Working from home

Y.Yamamoto tuki0918

🏠
Working from home
View GitHub Profile
@tuki0918
tuki0918 / presentation.js
Created November 23, 2013 11:42
GistのMarkdownで作るプレゼンテーション
var $bgWindow = $('<div/>');
$bgWindow.css({
'background-color': '#222',
'opacity': '.95',
'position': 'fixed',
'left': 0,
'top': 0,
'width': '100%',
'height': '100%',
'z-index': 999
@tuki0918
tuki0918 / topsy_pager.js
Created November 3, 2013 05:53
ブックマークレット:TOPSY ページの自動オフセット切り替え
var countUp = 24;
var field = 'offset';
var re = new RegExp('('+field+'=)(\\d{0,})');
var offset = location.search.match(re);
var num = 0;
var href = location.href;
if (offset) {
@tuki0918
tuki0918 / a.coffee
Created July 2, 2013 01:48
http://raizin-japan.com/cool/ の canvasで動いてる部分のみ下に移動するやつ ChromeのConsoleで実行
smokes = ['.vSmokeL', '.hSmokeL', '.cSmokeL', '.vSmokeR', '.hSmokeR', '.cSmokeR']
hidden = ['.main-copy', '.product-info']
for h in hidden
$(h).each ->
$(this).css('visibility', 'hidden')
return
for s in smokes
$(s).each ->
@tuki0918
tuki0918 / Gruntfile.coffee
Created June 14, 2013 07:43
TiShadow-Grunt-Jasmine
module.exports = (grunt)->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
files: ['coffee/**/*.coffee']
tasks: ['coffee', 'tishadow:test']
coffee:
compile:
files: [
expand: true
(function(){
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
$('<div/>').css({
position: 'fixed',
left: 0,
@tuki0918
tuki0918 / method.js
Last active December 18, 2015 04:59
JS汎用コード
(function(){
alert(1);
alert(2);
alert(3);
})();
<button id="addNewObserver">Add New Observer checkbox</button>
<input id="mainCheckbox" type="checkbox">
<div id="observersContainer"></div>
Password =
SYMBOL: '!"#$%&\'()'
NUMBER: '1234567890'
ABC_L: 'abcdefghijklmnopqrstuvwxyz'
ABC_U: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
generate: (len)->
password = ''
# 11以下 -> 12, 17以上 -> 16
len = 12 if typeof len is 'undefined' or len <= 11
class DynamicScroll
constructor: (@data, @rows)->
@page = 1
@lastIndex = 0
@maxLength = data.length
hasNext: ->
return @lastIndex < @maxLength
next: ->
stat = @lastIndex
end = @rows * ( @page - 1 ) + @rows
@tuki0918
tuki0918 / _index.html
Last active December 15, 2015 15:58
html5 Initialize with underscore
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">