This is my own interpretation of how I like to work, feedback welcome! Especially if my own view of how I think I like to work doesn't match your experience of how it seems I like to work!
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
# concepts/thing/contract/contract.rb | |
require 'disposable/twin/property/hash' | |
module Thing::Contract | |
class Contract < Reform::Form | |
include Disposable::Twin::Property::Hash | |
property :data, field: :hash do | |
property :foo_bar |
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 "benchmark" | |
n = 100_000 | |
Benchmark.bm(7) do |x| | |
x.report("merge! : ") do | |
a = {} | |
n.times { |i| a.merge! i => "1" } | |
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
// simple constructor | |
// | |
private final int x; | |
private final int y; | |
private final String z; | |
| |
public MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; |
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
class Person | |
@@klass_name = "Person" | |
def initialize(name) | |
@name = name | |
end | |
def self.klass_name | |
@@klass_name | |
end |
- Create a new request bin by going to requestb.in and clicking on "Create a RequestBin"
- You should see something like below:
Make a request to get started. After making a request, refresh this page to see it.
curl -X POST -d "fizz=buzz" http://requestb.in/<YOUR_OWN_BIN_ID>
- Copy it and run it in your terminal or command line with
curl
- You should see the return
ok
and also the sent request by refreshing the page in your browser
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
curl --header 'Content-Type: application/json' \ | |
--header 'Snit-Session: <skey>' \ | |
http://localhost:3000/feed/<epoch> | |
curl --header 'Content-Type: application/json' \ | |
--header 'Snit-Session: <skey>' \ | |
http://localhost:3000/feed/0 | |
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
curl --header 'Content-Type: application/json' \ | |
--header 'Snit-Session: SNIT_SESSION_KEY' \ | |
http://<api_url>/feed/mine |
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
curl -X POST \ | |
--header 'Content-Type: application/json' \ | |
-d '{"ph":"0912345678","nick":"","name":"Thar Htet","email":"bla@gmail.com","pwd":"12345678"}' \ | |
http://localhost:3000/sign_up |
NewerOlder