This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<title>whatever</title> | |
<style type="text/css"> | |
html,body { overflow:hidden; height: 100%; margin:0; padding:0; } | |
#top { position:fixed; height:40px; width:100%; background-color:#000 } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- First attempt: | |
EXPLAIN ANALYZE SELECT count(DISTINCT date_trunc('week',s)) FROM generate_series('1900-01-01'::date,CURRENT_DATE,interval '1 day') AS s; | |
QUERY PLAN | |
-------------------------------------------------------------------------------------------------------------------------------- | |
Aggregate (cost=12.51..12.53 rows=1 width=8) (actual time=72.552..72.553 rows=1 loops=1) | |
-> Function Scan on generate_series s (cost=0.01..10.01 rows=1000 width=8) (actual time=24.495..27.619 rows=40975 loops=1) | |
Total runtime: 73.005 ms | |
(3 rows) | |
SELECT count(DISTINCT date_trunc('week',s)) FROM generate_series('1900-01-01'::date,CURRENT_DATE,interval '1 day') AS s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global, define) { | |
var loader = false; | |
// detect if there is an amd loader on the global namespace | |
if(typeof global.define === 'function') { | |
loader=true; | |
} | |
{{ALMOND_SHIMMED_LIBRARY}} | |
if(typeof module !== 'undefined' && module.exports) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this code will run mode_one once, then mode_two forever. | |
#include <stdio.h> | |
// a pointer to the mode you want to call | |
void (*modePtr)(); | |
// function prototypes | |
void mode_one(); | |
void mode_two(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=frame-nopass.pdf -c .setpdfwrite -f frame.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var runner = require('grunt-runner'); | |
var concat = require('grunt-contrib-concat'); | |
var config = { | |
src: 'path/to/src', | |
concat: { | |
targetOne: { | |
src: '<%= src %>/one/*.js', | |
dest: 'output1.js' | |
}, | |
targetTwo: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
const depMap = require('./depmap'); | |
function depMapper (table) { | |
var deps = depMap[table].reverse(); | |
return _.uniq(_.chain(deps).reduce(function (result, dep) { | |
result.push(depMapper(dep)); | |
return result; | |
}, []).flatten().value().concat(deps)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
POLL_INTERVAL=1 | |
TIMEOUT_COUNT=5 | |
COUNTER=1 | |
FILE="stop.txt" | |
printf "waiting for stop.txt to appear" | |
while true; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cancellable(fn) { | |
var cancelled = false; | |
var wrapped = function() { | |
if (!cancelled) { | |
fn.apply(null, arguments) | |
} | |
}; | |
wrapped.cancel = function() { | |
cancelled = true; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Tyler's A.K.A. Hobbes First Program | |
** File Name: Tyler.Prg | |
SET STATUS OFF | |
SET SCOREBOARD OFF | |
SET TALK OFF | |
** Section To name memory variables | |
name=space(25) | |
male=.t. |
OlderNewer