Skip to content

Instantly share code, notes, and snippets.

@Chris2048
Chris2048 / gist:3f6a41fc325c488673f2
Created October 1, 2014 21:24
Controller ideas
### Controller ideas
# Subcontroller takes the lead
class Controller(object):
def go(self):
a = self.aye()
yield a
b = self.bee(a)
yield b
@Chris2048
Chris2048 / misc.py
Created November 25, 2015 23:09
Misc Code...
import os
import png
IMG_DIR = './static/img/'
for _, _, files in os.walk(IMG_DIR):
for file in files:
if file.endswith('.png'):
with open(IMG_DIR + file, 'r+') as f:
height, width = png.Reader(f).read()[:2]
f.seek(0) # reset pointer
@Chris2048
Chris2048 / designer.html
Last active January 2, 2016 20:53
designer
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@Chris2048
Chris2048 / designer.html
Last active April 14, 2016 23:45
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@Chris2048
Chris2048 / designer.html
Created December 7, 2016 23:04
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;