After integrate, watermark, html2canvas correctly render canvas.change from html2canvas to chartjs instancechart.canvas.toDataURL("image/png") // raise because watermark.image cross domain origincopy the remote image url to localimport localImg from 'path to image'watermark: {image: localImg...}
#!/bin/bash # env variables export AWS_ACCESS_KEY_ID=*** export AWS_SECRET_ACCESS_KEY=*** export AWS_DEFAULT_REGION=*** export AWS_S3_URL=s3://bucket_name echo $(date +"%Y-%m-%d %T"): START chatfuel_production database backup # get a dump of database echo $(date +"%Y-%m-%d %T"):...
https://stilearning.com/vision/index.html
https://stackoverflow.com/questions/16326143/google-maps-directions-api-equivalent-url
Testing toolscucumbercapybararspecFrontend toolsreactjsangularjsvuejsBackend toolsruby on railsDevOps toolsAgileSoftware Best PracticesDesign Patterns / Principles
it is a software development process.Why bother?Share understanding of the problem between software teams & business peopleWork rapid, work small, work iterate, get early feedbackSystem documentation (system behavior)Enable collaboration across rolesagile?user stories?BDD is a plugin to agile...
Seeding data is the initial data that one system require to have whileSimulation data is the complement over seeding data, generally we use to generate production-like data in development.For example,My system requires at least one user role.so I need to generate seed data for at least one user...
Keep helpers and views object-oriented by decorate modelsource codeQuick startadd gem to gemfilegem 'active_decorator' Then bundle install Create a simple model I called it Author with 2 attributes, first_name and last_namerails generate model Author first_name last_name run migrationrails...
It is a framework for building view components in Ruby on Rails.Ruby objects that output HTML.Benefit:Unit-testedCheaperQuick startbin/rails generate component Example title content also support others template engines such as erb, haml, and slim.bin/rails generate component Example title...
https://www.artima.com/intv/ruby.html#part4
If Design less, Do more or If Design More, Do Less
How to works as a team but independently
list = array (ruby)+ slice[start:end]<inclusive:exclusive>del() : remove item from the list.x = ['a', 'b', 'c'] del(x[1]) # ['a', 'c'] = copy by referencelist() , [:] copy by valueimport numpy;import numpy as np; # recommended, it's clearly define what array belong to npfrom numpy import...
https://github.com/TrestleAdmin/trestle
This work for the fresh page.$jquery = $("#audio") but after$('.modal-body').html('<%= j render("form") %>'); the $jquery will not work anymoreit seems like jquery still remember the cached and can't reference the new onethat rails replace.so,$jquery = $(".modal-body").find("audio") Helps,
def join_both_message inner_query = Message\ .merge(join_voice_message)\ .joins("UNION SELECT messages.* FROM messages")\ .merge(join_text_message) Message.unscoped.select("*").from(inner_query, :messages) end
When select option is changed, link to new page with query string$(document).on("change", "#province", function(e) { var province = $(this).val() var params = new URLSearchParams(location.search) params.set('province', province); var url = `${location.pathname}?${params}` ...
Devise extensionsMasqueraderails templatesshfsmicroservicesbdd-stack-on-a-rails-5-application
When submit a form , rails will strip empty paramsso you cannot update roles by just clear all roles from this variable.this is an expected behavior in rails (for security reason)I also have to try to disable deep_munge but still no luck# config/application.rb config.action_dispatch.deep_munge =...
My name is radinNice to meet you.