Skip to content

Instantly share code, notes, and snippets.

@foo9
foo9 / gist:6267702
Last active December 21, 2015 06:59
on work_folder(the_path)
tell application "Finder"
set the_files to every file of the_path
repeat with afile in the_files
peel_label(afile) of me
end repeat
set the_folders to every folder of the_path
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script type='text/javascript' src='http://code.jquery.com/jquery-git2.js'></script>
<style type='text/css'>
.selected {
background: #f00;
}
@foo9
foo9 / app.js
Last active December 20, 2015 14:48
Backbone.jsでModelによってViewを分ける
var App = {
Views: {},
Models: {},
Collections: {}
};
App.Models.Item = Backbone.Model.extend({
defaults: function() {
return {
viewtype: '',
@foo9
foo9 / Gruntfile.coffee
Last active December 20, 2015 05:18
編集 → 結合 → 再読み込み
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
options:
livereload: true
$(function() {
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
});
var YTAPIReady = false;
function onYouTubeIframeAPIReady() {
$ ruby -rwebrick -e "WEBrick::HTTPServer.new(:DocumentRoot => './', :Port => 8000).start"
@foo9
foo9 / gist:5780383
Created June 14, 2013 08:36
英字キーボードでvim
" Swap ; and :
nnoremap ; :
nnoremap : ;
@foo9
foo9 / gist:5770749
Last active December 18, 2015 10:48
GruntでCoffeeScriptコンパイル&圧縮

GruntでCoffeeScriptコンパイル&圧縮

npm, nodeは事前に導入済み

$ npm install -g grunt-cli
$ mkdir hogehoge
@foo9
foo9 / gist:5702194
Last active December 18, 2015 01:09
  • Backbone.Marionette

    • Backbone.BabySitter
      • Backbone.ChildViewContainer
        • add
        • findByModel
        • findByCollection
        • findByCustom
        • findByIndex
  • findByCid

@foo9
foo9 / memo.md
Last active December 17, 2015 22:39