(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #fork from https://github.com/huacnlee/init.d | |
| # export LC_ALL=zh_CN.UTF-8 | |
| # export LANGUAGE=zh_CN.UTF-8 | |
| # sudo locale-gen zh_CN.UTF-8 | |
| sudo apt-get -y install update | |
| sudo apt-get -y install curl | |
| echo "Install RVM" | |
| echo "---------------------------------------------------------------------------" |
| 'use strict' | |
| const timeout = ms => new Promise(res => setTimeout(res, ms)) | |
| function convinceMe (convince) { | |
| let unixTime = Math.round(+new Date() / 1000) | |
| console.log(`Delay ${convince} at ${unixTime}`) | |
| } | |
| async function delay () { |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>晓哲 subscriptions in feedly Cloud</title> | |
| </head> | |
| <body> | |
| <outline text="前端" title="前端"> | |
| <outline type="rss" text="掌心" title="掌心" xmlUrl="http://www.zhanxin.info/feed.xml" htmlUrl="http://www.zhanxin.info/feed.xml"/> | |
| <outline type="rss" text="Blog of Wenli Zhang" title="Blog of Wenli Zhang" xmlUrl="http://zhangwenli.com/blog/feed.xml" htmlUrl="http://zhangwenli.com/blog"/> |
| import UIKit | |
| /// A very simple example view that can accept keyboard input and add or delete text from an enclosed label. | |
| class CustomTextInputView : UIControl, UIKeyInput { | |
| var label : UILabel? | |
| override func canBecomeFirstResponder() -> Bool { | |
| return true | |
| } |
| # based on http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html | |
| module Auth | |
| extend ActiveSupport::Concern | |
| included do | |
| helpers do | |
| def session | |
| env['rack.session'] | |
| end |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import util.parsing.json.JSON | |
| import io.Source | |
| import scala.language.dynamics | |
| object Example extends App{ | |
| val json = """{ | |
| "name" : "Adam Slodowy", | |
| "active": "true", | |
| "roles" : [ "teacher", "admin" ], |
| <form action="http://v0.api.upyun.com/rbtest/" method="post" enctype="multipart/form-data"> | |
| <%= upyun_form_input_tag(:return_url => new_post_path) %> | |
| <input type="file" name="file" /> | |
| <button type="submit">上传图片</button> | |
| </form> |