Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
require.config({ | |
baseUrl: '/backbone-tests/', | |
paths: { | |
'jquery' : '/app/libs/jquery', | |
'underscore' : '/app/libs/underscore', | |
'backbone' : '/app/libs/backbone', | |
'mocha' : 'libs/mocha', | |
'chai' : 'libs/chai', | |
'chai-jquery' : 'libs/chai-jquery', | |
'models' : '/app/models' |
$fontawesome_path: "." !default | |
@font-face | |
font-family: 'FontAwesome' | |
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot') | |
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot?#iefix') format("embedded-opentype"), font-url('#{$fontawesome_path}/fontawesome-webfont.woff') format("woff"), font-url('#{$fontawesome_path}/fontawesome-webfont.ttf') format("truetype") | |
font-weight: normal | |
font-style: normal | |
@mixin icon($icon) |
ArrayBuffer.prototype.inspect = function () { | |
return "<ArrayBuffer (0x" + this.byteLength.toString(16) + " bytes)>"; | |
} | |
Uint8Array.prototype.inspect = function () { | |
var str = "<" + this.constructor.name; | |
for (var i = 0, l = Math.min(32, this.length); i < l; i++) { | |
str += " " + this[i].toString(16); | |
} | |
if (l < this.length) { | |
str += " (0x" + this.length.toString(16) + " total)"; |
The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
Handlebars.registerHelper('pagination', function(currentPage, totalPage, size, options) { | |
var startPage, endPage, context; | |
if (arguments.length === 3) { | |
options = size; | |
size = 5; | |
} | |
startPage = currentPage - Math.floor(size / 2); | |
endPage = currentPage + Math.floor(size / 2); |
LoadingRoute
has existed for a while, but it's barely useful
and largely broken. It's never gotten much love due to it largely being
a hangover of the router.js microlib, and we can make it better. The problems with
LoadingRoute
are intertwined with issues with facelift router's
handling of async transitions in some cases, but of which need to be
addressed, but here's a list of problems related to both:
LoadingRoute
that gets activated when# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |