- Download MP4:
https://github.com/alfg/mp4/blob/master/test/tears-of-steel.mp4?raw=true
- Run
go run mp4_example.go tears-of-steel.mp4
go run mp4_example_2.go tears-of-steel.mp4
# https://twitter.com/josh_cheek/status/1587406334839889921 | |
$**?$ # => "" | |
$**%$*$ # => "" | |
$**%** # => "" | |
$**%$$ # => "" | |
$_ = {} | |
alias $*$_ | |
public def *(*) = itself | |
alias ** * |
require 'objspace' | |
def self.show_allocations(&block) | |
_ = ObjectSpace.trace_object_allocations &block | |
ObjectSpace | |
.each_object | |
.to_a | |
.filter_map do |obj| | |
file = ObjectSpace.allocation_sourcefile obj | |
line = ObjectSpace.allocation_sourceline obj |
package main | |
import ( | |
"bytes" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
) |
This example will show how to push updates to the view for a Model instance that has changed without the user having to refresh the page.
This example focuses more on getting ActionCable working with Stimulus. If you don't already have stimulus setup in your app, here's a great write up on how to set it up: https://medium.com/better-programming/how-to-add-stimulus-js-to-a-rails-6-application-4201837785f9
Scan
model with attributes.ScanController#show
action.Scan
through the show.html.slim|haml|erb
view template.Run rails new --help
to see all of the options you can use to create a new Rails application:
Output for Rails 7+
Usage:
rails new APP_PATH [options]
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines)
deserialization_benchmark.rb
Each of these scenarios just changes the payload to be parsed, and does not change any deserialization options.
STEP 2: setup docker to run react app (dev and production) configuration: https://gist.github.com/przbadu/929fc2b0d5d4cd78a5efe76d37f891b6
Because we are using Docker
, we are not going to install node
, npm
, create-react-app
in our development machine, not even for generating create-react-app
scaffold.
For this purpose I am using 2-step docker configuration:
create-react-app
Go to the official website and choose your OS.
Docker for Mac has a problem is the disk IO performance (see docker/for-mac#77).
There is a fix (https://github.com/IFSight/d4m-nfs) which makes Docker use NFS instead of OSXFS.