to make touchscreen work:
echo "blacklist usbtouchscreen" | sudo tee -a /etc/modprobe.d/blacklist.conf
#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 | |
#!/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' && |
/*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'}) |
/*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 |
<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> | |
/** | |
* 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); |
#!/bin/bash | |
appCommand=$1 | |
appName=$2 | |
if [[ `wmctrl -l | grep "$appName"` ]]; then | |
wmctrl -a "$appName" | |
else | |
echo "running $appCommand" | |
$appCommand | |
wmctrl -a "$appName" |
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; | |
}; |