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
export default TechStackCheckboxes extend Component { | |
createTechStackCheckboxes() { | |
// starts with unchecked box | |
const isAllChecked = false; | |
// map out techStackItems and crate input boxes for each item | |
return this.props.techStackItems.map((item) => ( | |
<div key={item}> | |
<input | |
key={item} |
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
/* | |
Triangle with Shadow | |
*/ | |
.triangle-with-shadow { | |
width: 50px; | |
height: 200px; | |
position: relative; | |
overflow: hidden; | |
box-shadow: 0 16px 10px -17px rgba(0,0,0,0.5); |
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
//Customise Backbone.sync to work with Titanium rather than jQuery | |
Backbone.sync = (function() { | |
var methodMap = { | |
'create': 'POST', | |
'read' : 'GET', | |
'update': 'PUT', | |
'delete': 'DELETE' | |
}; | |
var xhr = Ti.Network.createHTTPClient({ timeout: 5000 }); |
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
SIGN UP | |
curl -H "Content-Type:application/json" -H "Accept:application/json" \ | |
-d "{\"user\":{\"password_confirmation\":\"12345678\", \"password\":\"12345678\", \"email\":\"[email protected]\"}}" \ | |
http://your_server.com/users | |
SIGN IN | |
curl -H "Content-Type:application/json" -H "Accept:application/json" \ | |
-d "{\"user\":{\"remember_me\":\"0\", \"password\":\"12345678\", \"email\":\"[email protected]\"}}" \ | |
http://your_server.com/users/sign_in |
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
search.html.erb | |
<%= form_tag(:action => "search") do %> | |
<%= label_tag(:q, "Search for:") %> | |
<%= text_field_tag(:wth) %> | |
<%= submit_tag("Search") %> | |
<% 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
class Person < ActiveRecord::Base | |
before_update :before_update_changes | |
attr_accessor :update_changes | |
def before_update_changes | |
@update_changes = changes | |
end | |
end |