Skip to content

Instantly share code, notes, and snippets.

View lillypiri's full-sized avatar
🦄
Doing stuff

Lilly Piri lillypiri

🦄
Doing stuff
View GitHub Profile
@ecoologic
ecoologic / Agile.md
Last active February 7, 2019 01:31

Agile Manifesto points

  • People over tools
  • Sw over doc
  • Collaboration over contract
  • Change over plan

Scrumban

renderScene(route, navigator){
return <route.component navigator={navigator} />
}
render(){
return(
<Navigator
initialRoute={{component: RamNavigation}}
renderScene={this.renderScene.bind(this)} />
)
@bvaughn
bvaughn / react-lifecycle-cheatsheet.md
Last active July 12, 2026 14:01
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount ✓ Constructor equivalent for createClass
render Create and return element(s)
componentDidMount ✓ ✓ DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps ✓ Update state based on changed props
@chantastic
chantastic / on-jsx.markdown
Last active May 22, 2026 08:30
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@clhenrick
clhenrick / README.md
Last active July 15, 2026 03:15
PostgreSQL & PostGIS cheatsheet (a work in progress)
@ddrscott
ddrscott / moon_spinner.rb
Created April 8, 2013 18:13
Rotating phases of the moon using Emoji.
# -*- coding: utf-8 -*-
# phases = %w{🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘}
phases = (0x1F311..0x1F318).to_a.collect{|c| [c].pack('U*')}
clear_line = "\r\e[0K"
1000.times do |i|
phase = phases[i % phases.size]
print "#{clear_line} #{phase}\t#{i} #{phase.unpack('U*').map{ |i| "\\u" + i.to_s(16).rjust(4, '0') }.join}"
sleep rand / 10.0
@springmeyer
springmeyer / degress2meters.js
Last active August 22, 2024 14:22
convert from long/lat to google mercator (or EPSG:4326 to EPSG:900913)
// See https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames for more details.
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
x= -77.035974