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
APP_ENV=local |
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
// Note the new way of requesting CoffeeScript since 1.7.x | |
require('coffee-script/register'); | |
// This bootstraps your Gulp's main file | |
require('./Gulpfile.coffee'); |
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
javascript: | |
var s='%s'; | |
url='http://reiseauskunft.bahn.de/bin/query.exe/dn?getstop=1&S=%s&Z=%s'; | |
query=''; | |
urlChunks=url.split('%s'); | |
console.log(s); | |
sChunks=s.split(' to '); | |
console.log(sChunks); | |
for(i=0; i<sChunks.length; i++)query+=urlChunks[i]+sChunks[i]; | |
location.replace(query); |
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
// font-face mixin | |
font-url(file) | |
return 'fonts/' + file | |
webfont(family, file, weight = normal, style = normal) | |
@font-face | |
font-family family | |
file += '/' + file | |
url(font-url(file + '.woff2')) format('woff2'), | |
url(font-url(file + '.woff')) format('woff') |
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
it 'should support dynamic attributes', -> | |
c """ | |
div(class=foo).foo&attributes(dynamicAttributes) | |
""" , '<div<?php attrs(array("class" => $foo, "class" => "foo"), $dynamicAttributes); ?>></div>' |
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
# a function that takes a function and returns a function | |
reduce = (operation) -> | |
# the returned function accepts a list | |
(list) -> | |
# and applies the operation passed to the outer function recursively to the list | |
if list.length > 2 | |
return operation list[0], reduce(operation)(list.slice(1, list.length)) | |
# until it is empty | |
else | |
return operation list[0], list[1] |
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
// inspect an object | |
mixin inspect(data, indentDepth) | |
- indentDepth = typeof indentDepth != "undefined" ? indentDepth : 2 // default indentDepth = 2 | |
pre=JSON.stringify(data, null, indentDepth) |
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
# based on http://www.paulund.co.uk/smooth-scroll-to-internal-links-with-jquery | |
$ -> | |
$('a[href*=#]:not([href=#])').on 'click.smoothscroll', (e) -> | |
e.preventDefault() | |
target = @hash | |
$target = $(target) |
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
/*! | |
* vue-dragula v1.0.3 | |
* (c) 2016 Yichang Liu | |
* Released under the MIT License. | |
*/ | |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('dragula')) : | |
typeof define === 'function' && define.amd ? define(['dragula'], factory) : | |
(global.vueDragula = factory(global.dragula)); | |
}(this, function (dragula) { 'use strict'; |
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
# deep map obj with function in context | |
deepMap = (obj, f, ctx) -> | |
res = {} | |
for key of obj | |
val = obj[key] | |
if typeof val == 'object' | |
res[key] = deepMap(val, f, ctx) | |
else | |
res[key] = f.call(ctx, val, key) | |
res |
OlderNewer