Skip to content

Instantly share code, notes, and snippets.

View rmw's full-sized avatar

Rebecca Miller-Webster rmw

View GitHub Profile
@rmw
rmw / 0_reuse_code.js
Created March 5, 2014 21:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Agile Software Development

Agile is a general philosophy describing a set of guiding principles for building software through iterative development. Agile development is about providing a framework that allows developers to build something useful for real world users and deal with the realities of interruptions, timelines, and technical requirements that disrupt an ideal development cycle. In other words, Agile development helps developers deal with reality.

SCRUM is a methodology -- in another words, an implementation -- pertaining specifically to project management. Other "Agile" methodologies inclue extreme programming, kanban.

SCRUM history:

Scrum was a term first used in 1987 to describe hyper-productive product development in Japan. The word Scrum comes from rugby, where scrum refers to the strategy used for getting an out-of-play ball back into play. The name Scrum stuck because of the similarities between the game of rugby and the type of product development prosc

@rmw
rmw / scope.js
Created May 19, 2014 15:21 — forked from ndelage/scope.js
// How many globals?
function Person(name) {
this.name = name;
}
function greeting(person) {
console.log("Hello " + person.name);
}
var roger = new Person("Roger");
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script>
<style>
.album {
float: left;
margin: 20px;
require 'active_record'
def setup
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
end
def generate_migrations
ActiveRecord::Migration.create_table :hotels do |t|
t.string :name
t.integer :room_count

Getting Your Rails App Ready for the Major League

Note: This doc is aimed towards hosting on Heroku. Many of these tips apply to any Rails host, but the details won't be the same.

Heroku is incredibly convenient but the defaults aren't entirely appropriate as web apps grow. This doc provides some tips for improving your app's performance, acting responsible with your data and handling the kind of issues you only experience in production.

Postgres Backups

A poorly written DB migration or slip up in console can be all it takes to loose data in production. Heroku offers a free backup add-on for Postgres databases. As part of the free plan Heroku offers either weekly or monthly backups. Weekly backups are the default.

Web App Performance

Back End

N+1

  @users = User.all.includes(:profile) # SELECT * from users

Excessive joins/subselects or exta queries

@rmw
rmw / main.dart
Created June 17, 2020 18:05 — forked from kauemurakami/main.dart
arquivo principal main
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(MyApp());
}