Skip to content

Instantly share code, notes, and snippets.

View GirlBossRush's full-sized avatar
🌎
Building open source geo-spatial software

Teffen Ellis GirlBossRush

🌎
Building open source geo-spatial software
View GitHub Profile

Warm up.

  1. What are some libraries that you've especially enjoyed working with? Why do you like them? What don't you like about them?

  2. What did you learn yesterday/this week? Expand on this. What makes them interested?

  3. Leading into... What excites or interests you about coding?

  4. What is your opinion of web standards? EMCAScript?

# React component for Bootstrap modals.
# Accepts an array of React objects for the body and actions.
# Arguments:
# * Type: String
# * Title: String
# * Body: React DOM
# * Actions: React DOM (Most likely an array).
React = require("react")
R = require("react-dom")
# Humanized timestamp component.
# Arguments:
# * datetime: ISO 8601 datetime String.
REFRESH_DELAY = 1000
React = require("react")
R = require("react-dom")
moment = require("moment/moment")
Function.prototype.call = function (context) {
var args = [];
args.push.apply(args, arguments)
args.shift();
return this.apply(context, args);
}
###
Usage:
* add model.name property that will be used as a namespace in the json request
* put this code before your Backbone app code
* use toJSON() as usual (so there is no namespacing in your templates)
* your model's data will be sent under model.name key when calling save()
###
# save reference to Backbone.sync
Backbone.oldSync = Backbone.sync

Git tips.

# Fetch branch updates from remote, and merge them into the respective local copy.
➜  iknow git:(stable) git pull

# Fetch all branch updates, but do nothing after.
➜  iknow git:(stable) git fetch

# Create and check out a branch from your current checked out branch (stable, some-feature-branch-#123, etc) 
REFRESH_DELAY = 6000
@HumanTime = React.createClass
displayName: "humantime"
getInitialState: ->
{relativeTime: @humanize(@props.datetime)}
componentDidMount: ->
@interval = setInterval(@refresh, REFRESH_DELAY)
<div class="content-primary">
<section class="column study-all">
button
<% if %>
count
<% else %>
don't have any
no-items-to-study
<% end %>
</section>
<div class="content-primary">
<section class="something study-all">
button
</section>
<section class="something review-all">
button
</section>
<section class="something item-stats">
<ul class="progress-breakdown">
<li class="stat started">
::before
<div class="stat-primary">
number
</div>
<div class="stat-secondary">
explanation
</div>