Skip to content

Instantly share code, notes, and snippets.

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}
@salbito
salbito / dabblet.css
Created November 26, 2012 03:05 — forked from chriscoyier/dabblet.css
Triangle with Shadow
/*
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);
@salbito
salbito / gist:1165174
Created August 23, 2011 13:52 — forked from powmedia/gist:1081802
Backbone.sync for Titanium
//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 });
SIGN UP
curl -H "Content-Type:application/json" -H "Accept:application/json" \
-d "{\"user\":{\"password_confirmation\":\"12345678\", \"password\":\"12345678\", \"email\":\"test5@test.com\"}}" \
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\":\"test5@test.com\"}}" \
http://your_server.com/users/sign_in
search.html.erb
<%= form_tag(:action => "search") do %>
<%= label_tag(:q, "Search for:") %>
<%= text_field_tag(:wth) %>
<%= submit_tag("Search") %>
<% end %>
--
@salbito
salbito / person.rb
Created January 18, 2010 14:41 — forked from Mikr0Tik/person.rb
class Person < ActiveRecord::Base
before_update :before_update_changes
attr_accessor :update_changes
def before_update_changes
@update_changes = changes
end
end