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/python3 | |
#-*- coding:utf8 -*- | |
# Modified for python3 | |
# python2 version https://gist.github.com/santhoshtr/bea3da00651bcd18e282 | |
import cairo | |
from gi.repository import Gtk, Gdk, Pango, PangoCairo | |
import cairo | |
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 600, 100) | |
context = cairo.Context(surface) |
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 http = require('http'); | |
var url = require('url'); | |
var proxy = http.createServer(function(req, res) { | |
var request = url.parse(req.url); | |
options = { | |
host: request.hostname, | |
port: request.port || 80, | |
path: request.path, | |
method: req.method, |
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/env node | |
const fs = require('fs'); | |
const path = require('path'); | |
const mailDir = path.join( __dirname, '..', '..', 'test-mails' ); | |
const {stdin} = process; | |
async function getStdin() { | |
let result = ''; |
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
<?php header("Content-Type: text/plain"); ?> | |
<?php header("Content-Disposition: inline"); ?> | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
//IMPORTANT: Update the pin and length to match your LED strip! | |
#define PIN 5 | |
#define LENGTH 150 |
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
wifi.setmode(wifi.STATION) | |
wifi.sta.config("creationix","noderocks") | |
wifi.sta.connect() | |
tmr.alarm(0, 1000, 1, function () | |
local ip = wifi.sta.getip() | |
if ip then | |
tmr.stop(0) | |
print(ip) | |
dofile("websocket.lc") | |
dofile("main.lc") |
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/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'xanter' | |
#from datetime import datetime | |
import signal | |
import time | |
import dbus | |
import gobject | |
import urllib2 |
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
// Type definitions for Feathers | |
// Project: http://feathersjs.com/ | |
// Definitions by: Jack Guy <http://thatguyjackguy.com> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
import { Application, Handler, ErrorRequestHandler } from 'express'; | |
type HandlerArgument = Handler | Handler[]; | |
export = Feathers; |
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
/** | |
* NOTE: Because Chrome doesn't elevate the permissions | |
* of snippets, we can't push the image out to the browser | |
* using canvas.toDataURL(), we have to add it to the page | |
* and have the user right-click and save-as | |
*/ | |
var css = function(el, styles){ | |
for (var style in styles) { | |
if(!styles.hasOwnProperty(style)) continue; | |
el.style[style] = styles[style]; |
NewerOlder