Skip to content

Instantly share code, notes, and snippets.

@totora0155
totora0155 / keymap.cson
Created January 26, 2015 08:11
keymap.cson of ATOM
# Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
@totora0155
totora0155 / contentEditablize.coffee
Last active August 29, 2015 14:13
contentEditablize
doc = document
addLine = (e) ->
e.target.style.outline = '2px solid #F6C555'
e.target.style.outlineOffset = '-2px'
contentEditablize = (e) ->
el = e.target
el.contentEditable = true
'use strict';
var $, $$, browserSync, del, getTypeName, makeCompileStream, paths, reload, runSequence, use;
$$ = require('gulp');
$ = require('gulp-load-plugins')();
runSequence = require('run-sequence');
del = require('del');
browserSync = require('browser-sync');
reload = browserSync.reload;
'use strict'
$$ = require 'gulp'
$ = require('gulp-load-plugins')()
runSequence = require 'run-sequence'
del = require 'del'
browserSync = require 'browser-sync'
reload = browserSync.reload
paths =
html: 'app/**/*.html'
@totora0155
totora0155 / create-dynamic-link-tag.html
Last active August 29, 2015 14:13
動的link読み込み
@charset "utf-8"
// normalize.css v3.0.2 | MIT License | git.io/normalize
html
font-family: sans-serif
-ms-text-size-adjust: 100%
-webkit-text-size-adjust: 100%
body
margin: 0
<!doctype html>
<html lang="ja" class="init"{{#if site.angular.name}} ng-app="{{site.angular.name}}"{{/if}}>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{site.name}}</title>
<meta name="keywords" content="{{site.name}},{{site.keywords}}">
<meta name="description" content="{{site.description}}">
<meta name="author" content="nju33">
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.loadNpmTasks('assemble')
grunt.initConfig
site: grunt.file.readYAML 'config/site.yml'
dpl: grunt.file.readYAML 'config/deploy.yml'
src:
lib: 'src/lib'
img: 'src/img'
@totora0155
totora0155 / _withheader.html
Last active December 24, 2015 05:59
</body></html>は省く。<script></script>で終わる。階層を浅くする。<body>にはclassを付けない。相対Pathで書く。
<!doctype html>
<html lang="ja" class="init">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>$1</title>
<meta charset="utf-8">
<meta name="keywords" content="$1">
<meta name="description" content="">
<meta name="author" content="nju33">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@totora0155
totora0155 / start.sass
Last active December 22, 2015 14:18
必ず.initのような親セレクタを設定。親セレクタの前は3行開ける。stのctrl+rで検索。
@charset "utf-8"
@import "_common", "import/_constant"
%container
width: 96rem
margin: 0 auto
%trsq
transition: .25s linear