// ==UserScript== | |
// @name Table copier | |
// @version 0.1 | |
// @description Copy a table to clipboard. Pasteable into spreadsheets. | |
// @author Jakub Marcinkowski <kuba.marcinkowski on g mail> | |
// @match http*://*/* | |
// @grant GM_registerMenuCommand | |
// @grant GM_setClipboard | |
// ==/UserScript== |
const { JSDOM } = require("jsdom"); | |
const responsiveImage = require("./src/js/responsive-image"); | |
// Set the project root for use with Sharp. | |
global.__rootdir = __dirname; | |
module.exports = function(eleventyConfig) { | |
eleventyConfig.addPassthroughCopy("img"); | |
eleventyConfig.addTransform("transform-sharp", async function( |
/* | |
* This script will scrape text posts from a Tumblr blog and export them as `.md` | |
* files with YAML frontmatter ready to be used in a Middleman blog. | |
* | |
* Aliases are added for the _middleman-alias_ gem so Tumblr style URLs like | |
* `/post/{id}/{slug}` will redirect to the Middleman-style URL. | |
* | |
* Although I built this for migrating to Middleman it should be pretty easy to | |
* adapt this for any similar static site generator. | |
*/ |
float[] hann(float[] x) { | |
int n = x.length; | |
float[] result = new float[n]; | |
for(int i = 0; i < n; i++) { | |
float weight = .5 * (1 - cos((TWO_PI * i) / (n - 1))); | |
result[i] = x[i] * weight; | |
} | |
return result; | |
} |
int[][] result; | |
float time; | |
void setup() { | |
setup_(); | |
result = new int[width*height][3]; | |
} | |
void draw() { | |
for (int i=0; i<width*height; i++) |
- A List Apart Using SVG For Flexible, Scalable, and Fun Backgrounds, Part I
- Mozilla Applying SVG effects to HTML content
- Smashing Magazine Resolution Independence With SVG
- Smashing Magazine Rethinking Responsive SVG
- CSS Tricks http://css-tricks.com/svg-sprites-use-better-icon-fonts/
#Reporter Save File Schema
##The Reporter Export File
Reporter saves to your Dropbox account with plaintext JSON files, one for each day. When a Report is entered in the app a file is created for that day if it does not exist. Otherwise, the report is appended to the existing file. The save folder is located in 'Dropbox/Apps/Reporter-App/'.
Reporter save files are named according to the following convention:
YYYY-MM-DD-reporter-export.json
class Post | |
@data = Gollum::Wiki.new('doc/blog.git', :mathjax => true) | |
@@unindexable = 'page' | |
@@unreadable = 'pending' | |
def self.data | |
@data | |
end | |
def self.reload |
I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.
Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs
gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.
One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.