Skip to content

Instantly share code, notes, and snippets.

View DekusDenial's full-sized avatar

D Morty k DekusDenial

  • United States
View GitHub Profile
@DekusDenial
DekusDenial / Gruntfile.js
Created June 28, 2013 13:55
minimal gruntfile
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg : grunt.file.readJSON("package.json"),
meta : {
js : [
'js/*.js',
'lib/*.js'
],
@DekusDenial
DekusDenial / Gruntfile.js
Created June 18, 2013 05:49
Gruntfile for brackets
/*
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
@DekusDenial
DekusDenial / prime.js
Created June 17, 2013 05:00
Prime Number
function Prime() {
this.prime = 1;
}
Prime.prototype.isPrime = function(num) {
var result = true, maxToCheck = Math.ceil(Math.sqrt(num)); // integer number comparison is faster
if (num & 1) { // if odd number
for (var f = 3; f <= maxToCheck; f += 2) {
if (!(result = !!(num % f))) return false;
@DekusDenial
DekusDenial / Gruntfile.coffee
Created June 16, 2013 04:17
More comprehensive Gruntfile
module.exports = (grunt) ->
grunt.initConfig
appDir: "./app"
srcDir: "<%= appDir %>/src"
contentDir: "<%= appDir %>/content"
templateDir: "<%= appDir %>/templates"
vendorDir: "<%= appDir %>/vendor"
cssDir: "<%= appDir %>/stylesheets"
testDir: "./test"