Skip to content

Instantly share code, notes, and snippets.

Making an office dashboard with a Raspberry Pi

Start with a basic Raspbian install.

Rationale

  • chromium – a browser, that will be run in a full-screen “kiosk” mode
  • matchbox – a lightweight, single-window X environment for the browser to run in (starting a full desktop environment would be wasteful)
  • x11-xserver-utils – tools to allow configuring the X environment to, for instance, prevent the screen from blanking after several minutes
  • unclutter – hide the mouse
@Nemo157
Nemo157 / get_docker_image_cmds.js
Created September 24, 2014 23:54
Grab the commands used to generate a docker image.
#!/usr/bin/env node
/* global process, console */
if (process.argv.length < 3 || process.argv.length > 4) {
console.log("Usage: DOCKER_REGISTRY=https://registry.hub.docker.com/" + process.argv[0] + " " + process.argv[1] + " repository [tag]");
process.exit(2);
}
var repository = process.argv[2];
if (process.argv.length > 3) {
var chosen_tag = process.argv[3];
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<style type="text/css">
@charset "UTF-8";
* {
font-family: monospace;
}
#!/usr/bin/env ruby
#
require 'active_support/multibyte/chars'
class String
def mb_chars
ActiveSupport::Multibyte::Chars.new(self)
end
end
/************************************************
*WordCloud methods below are modifications of wordcloud by yoah.bardavid@gmail.com and razbarvaz@gmail.com
*wordcloud is part of the following project: http://visapi-gadgets.googlecode.com
*The visapi-gadgets project is licensed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*Modifications include:
* inclusion of a some sort of a log scale
* exclusion of single letter words
* exclusion of excludedTerms
* exclusion of numbers
* attempt to merge plural and singular
CmdUtils.CreateCommand({
name: "mail",
takes: {"message": noun_arb_text},
icon: "chrome://ubiquity/content/icons/email.png",
modifiers: {to: noun_type_contact},
description: "Begins composing an email to a person from your contact list.",
help: "Currently works with the mail client you have set as your default application to handle mailto: links. Try selecting part of a web page (note: images, and other dynamic elements will not be included) and then issuing &quot;mail this&quot;. You can also specify the recipient of the email using the word &quot;to&quot; and the name of someone from your contact list or address book. For example, try issuing &quot;mail hello to jono&quot; (assuming you have a friend named &quot;jono&quot;).",
preview: function(pblock, directObj, modifiers) {
var html = "Creates an email message ";
if (modifiers.to) {
int[] e12 = {10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82};
for(int i = 0; i < e12.length(); i++){
for(int j = i; j < e12.length(); j++){
values.add(i, j);
}
}
@Nemo157
Nemo157 / gist:657765
Created November 1, 2010 07:14
WIAB ant output
nemo157@files3 wave-devel/wave-protocol
â ant
Buildfile: build.xml
init:
[mkdir] Created dir: /home/nemo157/wave-devel/wave-protocol/build/core
[mkdir] Created dir: /home/nemo157/wave-devel/wave-protocol/build/test
[mkdir] Created dir: /home/nemo157/wave-devel/wave-protocol/build/instr
[mkdir] Created dir: /home/nemo157/wave-devel/wave-protocol/build/staging
[mkdir] Created dir: /home/nemo157/wave-devel/wave-protocol/build/testoutput
@Nemo157
Nemo157 / Benchmark.cs
Created November 15, 2010 21:51
A simple microbenchmarking file.
// The MIT License
//
// Copyright (c) 2008 Jon Skeet
//
// 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:
@Nemo157
Nemo157 / extensions.cs
Created November 17, 2010 00:23
Converts integers to ordinal strings.
public static class MyExtensions
{
public static String ToOrdinalString(this Int32 num)
{
switch (num % 100)
{
case 11:
case 12:
case 13:
return num.ToString() + "th";