I hereby claim:
- I am ramhoj on github.
- I am nicklasr (https://keybase.io/nicklasr) on keybase.
- I have a public key ASDb3W52z30nZtCeQZx9hoTEX55FPq5FdZjz9VoZ9odoEQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class PostsController < ApplicationController | |
| def destroy | |
| # … | |
| @post.broadcast_refresh_frame target: "notifications" | |
| end | |
| private | |
| def broadcast_refresh_frame(target: dom_id(self)) | |
| broadcast_action "refresh", target: target, html: "" | |
| end |
| gem "rails", "6.0.3.6" | |
| gem "bonsai-elasticsearch-rails", "~> 7" | |
| gem "elasticsearch-model", github: "elastic/elasticsearch-rails", branch: "master" | |
| gem "elasticsearch-rails", github: "elastic/elasticsearch-rails", branch: "master" |
| #!/usr/bin/env bash | |
| # Credit: https://stackoverflow.com/a/59795634/1686364 | |
| host="localhost:9200" | |
| response="" | |
| attempt=0 | |
| until [ "$response" = "200" ]; do | |
| if [ $attempt -ge 25 ]; then |
Shortcut to prepend module that checks an argument and only calls original implementation if argument evals to false. Other versions could instead execute super(*args) and do different things depending on the result.
rails new actiontexttest --webpackerbin/rails serverbin/webpack-dev-server| export default [ | |
| { | |
| table: 32, | |
| from: 1, | |
| to: 1600, | |
| value: 0 | |
| }, | |
| { | |
| table: 32, | |
| from: 1601, |
| { | |
| "status": 1, | |
| "list": { | |
| "229279689": { | |
| "item_id": "229279689", | |
| "resolved_id": "229279689", | |
| "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview", | |
| "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland", | |
| "favorite": "0", | |
| "status": "0", |
| brew install erlang | |
| brew install elixir | |
| git clone https://github.com/phoenixframework/phoenix.git | |
| cd phoenix | |
| mix do deps.get, compile | |
| mix phoenix.new ../my_app | |
| cd ../my_app | |
| mix do deps.get, compile | |
| mix phoenix.server |
| require "aws-sdk" | |
| require "pry" | |
| filename = File.expand_path("./deploy/video.rb", File.dirname(__FILE__)) | |
| config_file = File.open(filename, "w") | |
| client = Aws::EC2::Client.new( | |
| region: "eu-west-1", | |
| access_key_id: "access_key_id", | |
| secret_access_key: "secret_access_key" |