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
<link rel="import" href="../components/polymer/polymer.html"> | |
<link rel="import" href="/components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#core_drawer_panel { | |
position: absolute; | |
top: 620px; |
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 lab_data = nio.src.socketio('http://54.197.236.34:443')('lab'); | |
function digitalSensor(selector, on_text, off_text) { | |
var el = d3.select(selector); | |
return _.assign({}, nio._streamer, { | |
write: function (data) { | |
if (data == 'on') { | |
el.selectAll('.status').html(on_text); | |
el.attr('status', 'on'); |
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
request = require 'request' | |
_ = require 'lodash' | |
Nightmare = require 'nightmare' | |
nightmare = new Nightmare() | |
findImages = (link) -> | |
nightmare | |
.goto link | |
.wait() | |
#.evaluate getImages, logImages |
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
package main | |
import "honnef.co/go/js/console" | |
func main() { | |
console.Log("hello") | |
} |
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 http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<title>Coddee</title> | |
<link rel="stylesheet" href="stylesheets/master.css" /> | |
</head> | |
<body id="tutorial"> | |
<div id="layout-header"> | |
<h1>coddee</h1> |
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
from django.db import models | |
class TimeAwareModel(models.Model): | |
created_on = models.DateTimeField(editable=False, auto_now_add=True) | |
updated_at = models.DateTimeField(editable=False, auto_now=True) | |
class Meta: | |
abstract = 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
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> | |
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'> | |
<head> | |
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' /> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> | |
<title></title> | |
<meta name='description' content=''> | |
<meta name='author' content=''> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0'> | |
<link rel='stylesheet' type='text/css' href='css/master.css' /> |
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
mongoose.Types.DocumentArray.prototype.sortByDir = function(direction, path) { | |
this.sort(function(a, b) { | |
var aVal = a.get(path), | |
bVal = b.get(path); | |
if (!aVal && !bVal) return 0; | |
if (!aVal) return 1; | |
if (!bVal) return -1; | |
if (direction > 0) return !(aVal < bVal); | |
return (aVal < bVal); | |
}); |
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
#!/usr/bin/python | |
import os | |
import subprocess | |
import signal | |
import sys | |
STATICGEN_ROOT = (os.path.join(os.path.dirname( | |
os.path.dirname(os.path.abspath(__file__))), | |
'staticgen')) | |
staticgen_path = lambda *a: os.path.abspath(os.path.join(STATICGEN_ROOT, *a)) |
OlderNewer