You need:
- to define an app
- to define a mime type
- set default
exports.getBeginningOfMonth = function getBeginningOfMonth(timestamp) { | |
const d = new Date(timestamp); | |
return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), 1, 0, 0, 0, 0); | |
}; | |
exports.getEndOfMonth = function getEndOfMonth(timestamp) { | |
const d = new Date(timestamp); | |
const end = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1, 0, 0, 0); | |
return end - 1; | |
}; |
#!/bin/bash | |
appCommand=$1 | |
appName=$2 | |
if [[ `wmctrl -l | grep "$appName"` ]]; then | |
wmctrl -a "$appName" | |
else | |
echo "running $appCommand" | |
$appCommand | |
wmctrl -a "$appName" |
/** | |
* taken from: | |
* http://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/ | |
*/ | |
class GraphNode { | |
public edges:GraphNode[] = []; | |
constructor(public name:string) {} | |
public addEdge(c:GraphNode):void { | |
this.edges.push(c); |
<link href="../paper-tabs/paper-tabs.html" rel="import"> | |
<link href="../paper-tabs/paper-tab.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
</style> | |
/*jshint node:true*/ | |
'use strict'; | |
/** | |
* This scripts recursively renames every file and directory in the script path | |
* from camelCase and UpperCamelCase to dash-case | |
* | |
* Do a backup before executing this script | |
* | |
* @lecense MIT |
/*jshint node:true*/ | |
'use strict'; | |
var path = require('path'), | |
url = require('url'), | |
when = require('when'), | |
ffs = require('final-fs'); | |
var reworkRecompile = function (cssPath, reworkPath, doRework) { | |
return ffs.readFile(reworkPath, {encoding: 'utf-8'}) |
#!/usr/local/bin/node | |
var fs = require('fs'); | |
fs.readdir(__dirname, function (err, files) { | |
var contents = [], | |
mdFiles; | |
mdFiles = files.filter(function (file) { | |
return file.substr(-3) === '.md' && |
#include <boost/property_tree/ptree.hpp> | |
#include <boost/property_tree/json_parser.hpp> | |
#include <boost/filesystem.hpp> | |
#include <boost/foreach.hpp> | |
#include <string> | |
#include <set> | |
#include <exception> | |
#include <typeinfo> //for 'typeid' to work | |