Skip to content

Instantly share code, notes, and snippets.

View kylemellander's full-sized avatar

Kyle Mellander kylemellander

View GitHub Profile
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@kylemellander
kylemellander / capybara cheat sheet
Last active August 29, 2015 14:27 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@kylemellander
kylemellander / _variables.scss
Created October 23, 2015 00:17
Bootstrap Sass Mixin Cheatsheet
$bootstrap-sass-asset-helper: false !default;
//
// Variables
// --------------------------------------------------
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
@kylemellander
kylemellander / paginating-relationships.json
Last active July 18, 2016 00:00
Pagingating relationships
{
"data": {
"type": "user",
"id": 1,
"attributes": {
"name": "Tomster"
},
"relationships": {
"friends": {
"links": {
// payload
{
"data": {
"id": 1,
"type": "user",
"attributes": {
"name": "Tomster",
"favorite-food-id": 31
}
}
// payload
{
"data": {
"id": 1,
"type": "user",
"attributes": {
"name": "Tomster"
},
"relationships": {
{
"data": {
"id": 1,
"type": "user",
"attributes": {
"name": "Tomster"
},
"relationships": {
"friends": {
"data": [
// Unloads all the tweets when moving off the feed page
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
willTransition() {
this.store.unloadAll('tweet');
}
}
// request before
GET /friends/2
GET /friends/3
GET /friends/4
GET /friends/5
GET /friends/6
GET /friends/7
GET /friends/8
GET /friends/9
@kylemellander
kylemellander / mirage.config.js
Created April 28, 2017 18:19
Mirage Dev Boilerplate
export default function() {
//window.server = this;
this.get('users');
};