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
| def twitter_async_connect cookie, current_user=nil, country_code = nil | |
| oauth_token, outh_token_secret = SocialProvider::Manager.oauth_tokens_from_access_token(cookie[:twitter_oauth_token]) | |
| twitter_user = Twitter::REST::Client.new do |config| | |
| config.consumer_key = ENV['TWITTER_KEY'] | |
| config.consumer_secret = ENV['TWITTER_SECRET'] | |
| config.access_token = oauth_token | |
| config.access_token_secret = outh_token_secret | |
| end | |
| user = twitter_user.user | |
| omiauth = User.oauth_object({ |
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
| [ | |
| { | |
| "request":{ | |
| "method":"GET", | |
| "url":"/achievement_activities.json", | |
| "query_string_params":{ | |
| "query":"test" | |
| }, | |
| "body":null, | |
| "headers":[ |
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 'bundler/setup' | |
| require 'multijson_schema_generator' | |
| require 'json' | |
| require 'benchmark' | |
| json1 = '{"data":[{"id":"614","type":"posts","attributes":{"type":"Post","message":"Flip the table?\nSo what possibilities exist regarding handing over Startcoin (SC) to the community? I have an idea that is simple and easy to administer. Instead of focusing on using a volatile crypto (SC) to fund projects we could encourage projects to offer rewards in SC to community members that backed their project. In order for this to work we would need to create a community culture that is biased towards financially supporting projects that offer a decent SC reward. Imagine projects having a far greater chance of getting funded if they offer a 10% SC reward (something like 10 cents worth of SC for every dollar a backer contributes). The project lister would be trusted to send out SC to backers addresses (posted in project comments section by backers) at the close of a successful funding and if they did not it would obviou |
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
| h1 = {"data"=>[{"id"=>"614", "type"=>"posts", "attributes"=>{"type"=>"Post", "message"=>"Flip the table?\nSo what possibilities exist regarding handing over Startcoin (SC) to the community? I have an idea that is simple and easy to administer. Instead of focusing on using a volatile crypto (SC) to fund projects we could encourage projects to offer rewards in SC to community members that backed their project. In order for this to work we would need to create a community culture that is biased towards financially supporting projects that offer a decent SC reward. Imagine projects having a far greater chance of getting funded if they offer a 10% SC reward (something like 10 cents worth of SC for every dollar a backer contributes). The project lister would be trusted to send out SC to backers addresses (posted in project comments section by backers) at the close of a successful funding and if they did not it would obviously hurt their reputation. Obviously if the project lister needs to raise $100 they should a |
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 ContributionProcessWidget extends Component { | |
| render() { | |
| const { | |
| actions: { | |
| setCurrentStep, | |
| setFormField, | |
| setFormFieldError, | |
| setNotification, | |
| patchUsersTransaction, | |
| postUsersTransaction, |
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 HelloWorld < React::Component::Base | |
| param :time, type: Time | |
| render do | |
| p do | |
| span { "Hello, " } | |
| input(type: :text, placeholder: "Your Name Here") | |
| span { "! It is #{params.time}"} | |
| button(type: :button) { "login!" }.on(:click) do | |
| login! | |
| end if valid_new_input? |
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 ToDo | |
| attr_accessor :body, :id | |
| def initialize(id, body) | |
| @body = body | |
| @id = id | |
| end | |
| end |
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 ToDo | |
| attr_accessor :body, :id | |
| def initialize(id, body) | |
| @body = body | |
| @id = id | |
| end | |
| end |
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 ToDoForm < React::Component::Base | |
| param :add_todo, type: Proc | |
| define_state body: '' | |
| render do | |
| div do | |
| div do | |
| input(type: :text, value: state.body) | |
| .on(:change) { |e| state.body! e.target.value } |
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 ToDoList << React::Component::Base | |
| param :todos, type: Array | |
| render do | |
| params.todos.each do |todo| | |
| ToDoElement(todo: todo) | |
| end | |
| end | |
| end |