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 { field, TextInput } from 'a-plus-forms'; | |
@field() | |
class PhoneInput extends React.Component { | |
onChange = (text) => { | |
const phoneNumber = format(text); // to phone number | |
this.props.onChange(phoneNumber); | |
} | |
render() { |
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
<form action="/signin"> | |
<input type="text" name="username" /> | |
<input type="password" name="password" /> | |
<button type="submit">Sign In</button> | |
</form> |
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
const connect = (mapStateToProps, mapDispatchToProps) => magic ... | |
const MegaLopolos = (props) => | |
<div> | |
Stuff.... | |
</div> | |
export defaults connect(mapStateToProps, mapDispatchToProps)(cssModules(styles)(MegaLopolos)); |
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
zeus: echo "Spawining Zeus..." && zeus start &> /dev/null | |
resque1: sleep 2 && zeus rake resque:work RAILS_ENV=development COUNT=1 QUEUE=* | |
resque2: sleep 2 && zeus rake resque:work RAILS_ENV=development COUNT=1 QUEUE=* | |
resque3: sleep 2 && zeus rake resque:work RAILS_ENV=development COUNT=1 QUEUE=* | |
web: sleep 2 && zeus server |
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
require 'curses' | |
class Engine | |
def self.inst | |
@inst | |
end | |
def self.inst=(inst) | |
@inst = inst |
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
# | |
# Put this somwehere in your `spec/support` folder, then you can do something like that | |
# | |
# feature "Stuff" do | |
# feature 'new' do | |
# scenario 'user goes in and gets awesomized' do | |
# end | |
# | |
# scenario 'user goes in with evil intentions and doesn't get awesomized' do | |
# 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
# | |
# Save this into your `lib/mongoid/paperclip.rb` file | |
# | |
# | |
require "paperclip" | |
module Paperclip | |
class << self |
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
data: function() { | |
return { | |
trend : this.model.trend, | |
subtrend : this.model, | |
next_subtrend : this.model.nextSubtrend(), | |
next_trend : this.model.trend.nextTrend() | |
}; | |
} |
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
a.add, a.edit, a.delete | |
&:before | |
margin-right: .25em | |
a.add:before | |
content: "\271A" | |
a.edit:before | |
content: "\270E" |
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
// This way you can change the buttons color with a simple `background-color` setting | |
// without need to regenerate the whole gradient | |
input[type=button], input[type=submit], button | |
font-family: Arial, Helvetica | |
color: #333 | |
border: 1px solid #ccc | |
border-radius: .25em | |
text-shadow: 0 1px 1px rgba(0,0,0,.3) |