- sudo gem install rubygems-update
- sudo update_rubygems
This file contains hidden or 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 Card = (props) => { | |
return ( | |
<div style={{margin: '1em'}}> | |
<img width='75' src={props.avatar_url} /> | |
<div style={{display: 'inline-block', marginLeft: 10}}> | |
<div style={{fontWeight: 'bold', fontSize: '1.25em'}}> | |
{props.name} | |
</div> | |
<div>{props.company}</div> | |
</div> |
This file contains hidden or 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 Button extends React.Component { | |
handleClick = () => { | |
this.props.onClickFunction(this.props.incrementValue); | |
} | |
render() { | |
return( | |
<button onClick={this.handleClick}> | |
+{this.props.incrementValue} |
This file contains hidden or 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 strict'; | |
let idMaker = { | |
[Symbol.iterator](){ | |
let nextId = 8000; | |
return { | |
next(){ | |
return { | |
value: nextId++, | |
done: false |
This file contains hidden or 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
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
This file contains hidden or 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 './person.rb' | |
class Greeter < Person::Boy | |
PERSON_TYPE ="make it" | |
def initialize (name) | |
super(name) | |
end | |
def say_hi | |
puts "Hii #{@name}" | |
end | |
def say_bye |
This file contains hidden or 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
var AWS = require('aws-sdk'); | |
AWS.config.update({accessKeyId: config.AWSAccessKeyId, secretAccessKey: config.AWSSecretKey,{region: config.AWSRegion}}); | |
var sns = AWS.SNS(); | |
var params ={ | |
Name:"test", | |
Platform:"GCM",//or APNS (Apple ) or ADM (Amazon) | |
Attributes:{ // required |
This file contains hidden or 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
/* | |
Company Schema | |
{ | |
name : String , | |
founded:Number, | |
headquaters : {"type":ObjectId, ref:"City"} | |
} | |
City Schema | |
{ |
NewerOlder