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
def test | |
puts "this is some test" | |
end |
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
# use case: | |
# user has_many sport_sessions | |
# I want to return sport_sessions for a user week for week | |
# depending on given weekday | |
# module for DCI mixin | |
module UserRoles | |
module TrainingWeekRepresenter |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<table id="split"> | |
<thead></thead> | |
<tbody></tbody> |
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
requestFunction = (url, data) -> | |
$.ajax | |
url: url | |
data: data if data? | |
success: (response) -> | |
# do something with the response | |
console.log response | |
requestFunction("/posts") |
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
@rt = @rt ? {} # create a rt namespace if not already available | |
@rt.module = -> | |
name = 'fubar' | |
hiddenVar = 'this is hidden' | |
name: (value) -> | |
return name unless arguments.length | |
name = value |
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
""" | |
<div class='lt'></div> | |
<div class='t show_arrow'> | |
<div class='arrow t'></div> | |
</div> | |
<div class 'rt'> | |
<div class='close'></div> | |
</div> | |
... | |
""" |
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
import Ember from 'ember'; | |
const COLORS = [ | |
{ name: "red"}, | |
{ name: "green"}, | |
{ name: "refactor"} | |
].map((c) => Ember.Object.create(c)); | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
changeName(newName) { | |
this.set('appName', newName); | |
} | |
} |
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
import Ember from 'ember'; | |
const { computed } = Ember; | |
export default Ember.Component.extend({ | |
boundingRect: computed('element', function() { | |
const element = this.get('element'); | |
if (element) { | |
return element.getBoundingClientRect(); |
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
import DS from "ember-data"; | |
export default DS.JSONAPIAdapter.extend(); |
OlderNewer