Skip to content

Instantly share code, notes, and snippets.

@stephenwilley
stephenwilley / async_process.py
Created November 16, 2011 16:24 — forked from pplante/tornado-async-process-mixin.py
Module type version of original with gen example
# Adapted from here: https://gist.github.com/489093
# Original credit goes to pplante and copyright notice pasted below
# Copyright (c) 2010, Philip Plante of EndlessPaths.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
</template>
<script>
@stephenwilley
stephenwilley / Installation.md
Last active June 11, 2022 09:16 — forked from albertbori/Installation.md
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@stephenwilley
stephenwilley / mapiconmaker.js
Last active May 16, 2016 05:29 — forked from mcliment/mapiconmaker.js
MapIconMaker for Google Maps API v3
/**
* @name MapIconMaker
* @version 2.0b
* @author Pamela Fox, Marc Climent
* @copyright (c) 2008 Pamela Fox, 2010 Marc Climent
* @fileoverview This gives you static functions for creating dynamically
* sized and colored marker icons using the Charts API marker output.
*/
/*
#include <Joystick.h>
//Potentiometer Setup
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_JOYSTICK,
0, 0, // Button Count, Hat Switch Count
true, true, true, // X, Y, and Z Axis
true, false, false, // Rx, but no Ry or Rz (Rx represents throttle as fs2020 does not recognize the throttle axis!)
false, false, // No rudder or throttle (represented as Rx!)
false, false, false); // No accelerator, brake, or steering;
int throttle = 0;