This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.controller 'SampleController', ($scope, $http) -> | |
$scope.data = [] | |
$http | |
method: 'post' | |
url: 'https://api.parse.com/1/functions/sample_function' | |
headers: | |
'X-Parse-Application-Id': APP_ID | |
'X-Parse-REST-API-Key': API_KEY | |
'Content-Type': 'application/json' | |
data: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'angular' | |
require 'angular-sanitize' | |
angular.module 'app', ['ngSanitize'] | |
.directive 'marked', require './marked' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"browserify": { | |
"transform": [ | |
"coffeeify", | |
"browserify-shim" | |
] | |
}, | |
"browser": { | |
"jquery": "./bower_components/jquery/dist/jquery.js", | |
"angular": "./bower_components/angular/angular.js", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
<略> | |
"devDependencies": { | |
"coffee-script": "*", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp = require 'gulp' | |
less = require 'gulp-less' | |
cssimport = require 'gulp-cssimport' | |
autoprefixer = require 'gulp-autoprefixer' | |
concat = require 'gulp-concat' | |
minifyCss = require 'gulp-minify-css' | |
streamqueue = require 'streamqueue' | |
gulp.task 'css', -> | |
streamqueue objectMode: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modernizr = require 'browsernizr' # npm経由 | |
$ = require 'jquery' # bower経由 | |
require './yourscript' # サイト用のスクリプト | |
# ここに書き足してもOK | |
console.log 'This page is ' + $('H1').text() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page = (require 'webpage').create() | |
url = '#' | |
page.open "http://localhost:3000/", -> | |
page.evaluate (url) -> | |
$.ajax url: url, success: (str) -> window.ajaxResult = str | |
, url | |
timer = -> | |
result = page.evaluate -> window.ajaxResult | |
unless result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant ssh -c ifconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp = require 'gulp' | |
π = plugins = (require 'gulp-load-plugins')() | |
# Directories | |
CSSDIR = './app/assets/stylesheets' | |
JSDIR = './app/assets/javascripts' | |
FONTDIR = './app/assets/fonts' | |
# CSS | |
gulp.task 'css', -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "alias gulp='gulp --require coffee-script/register'" >> ~/.profile |