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
Preferences.sublime-settings: | |
{ | |
// colors | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"theme": "Soda Dark.sublime-theme", | |
"caret_style": "wide", | |
"font_size": 9, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"margin": 0, |
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
int leds[] = {D4, D3, D2, D1, D0}; | |
int led_count = 5; | |
int timer = 15; | |
void setup() { | |
for (int i = 0; i < led_count; i++) { | |
pinMode(leds[i], OUTPUT); | |
} | |
} | |
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
{ | |
"anaconda_linter_mark_style": "outline", | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": ".", | |
"selector": "source.python - string - comment - constant.numeric" | |
} | |
], |
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
# object instances as default arguments are evil | |
def nevar_forget(constarg={}): | |
constarg[len(constarg)] = 'the catch' | |
print(constarg) | |
return constarg | |
assert(nevar_forget() == {0: 'the catch'}) | |
assert(nevar_forget() == {0: 'the catch', 1: 'the catch'}) | |
assert(nevar_forget() == {0: 'the catch', 1: 'the catch', 2: 'the catch'}) |
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
ActionBar = React.createClass | |
mixins: [ | |
React.BackboneMixin("actions") | |
] | |
render: -> | |
<ul className="nav navbar-nav"> | |
<li className="dropdown"> | |
<a className="dropdown-toggle" data-toggle="dropdown" href='#'> |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, print_function, unicode_literals | |
from six import string_types, integer_types | |
from itertools import chain | |
class EnumMetaclass(type): | |
"""Metaclass for enumerations. |
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
MainView = React.createClass | |
mixins: [RouterHelpersMixin] | |
render: -> | |
<body> | |
<NavbarView | |
actions={@props.models.actions} | |
filters={@props.models.navbarFilters} |
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
/** @jsx React.DOM */ | |
var BootstrapModalMixin = function() { | |
var handlerProps = | |
['handleShow', 'handleShown', 'handleHide', 'handleHidden'] | |
var bsModalEvents = { | |
handleShow: 'show.bs.modal' | |
, handleShown: 'shown.bs.modal' | |
, handleHide: 'hide.bs.modal' |
OlderNewer