unixwiz.net

Note - This is not a tutorial on setup or configuration of Secure Shell, but is an overview of technology which...

set :assets_roles, %i[webpack] # Give the webpack role to a single server (see code block below) set :assets_prefix, 'packs' # Assets are located in /packs/

...related to Webpacker, but a nice thing Give the webpack role to a single server: # config/deploy/production.rb (analog to config/deploy/staging.rb) ... server ' ', user: ' ', roles: %w(... webpack) Make sure to read as well...

singlepageappbook.com

Great look at the tradeoffs between progressive enhancement with jQuery or similiar, vs. client-side views.

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself. Here we build a simple SVG image and wrap it into...

...attached JSFiddle for an example. Ruby If you like to do it on the server, here is some Ruby for you: def svg_uri(text) svg = <<~SVG #{text} SVG

Insert into ~/.bashrc and reload afterwards: source ~/.bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[41;33m\]\u@\h\[\033[00m...

...nil:NilClass (NoMethodError) Cache.stderr_path.write(stderr.string) ^^^^^^^ ... rubocop-1.61.0/lib/rubocop/server/socket_reader.rb:27:in `read!': uninitialized constant RuboCop::Server::SocketReader::StringIO (NameError) stderr = StringIO.new ^^^^^^^^ this card might help you. In old versions of rubocop...

Warning after an upgrade, make sure to terminate all running rubocop server processes (ps aux | grep rubocop, then kill the pid...

I recently ran into this issue when processing a massive backlog of documents. The server completely stalled, sometimes taking up to 30 minutes for a single page. It turned out...

...of the image junk, the deskew algorithm can safely remain enabled without bringing the server to its knees. It straightens skewed scans and preserves the OCR quality. ocrStrategy: auto vs...

Occasionally you need to do something directly on the server -- like having all records recalculate something that cannot be done in a migration because it takes a long time.

...you may have been successful with this on your development machine or the staging server, keep in mind that production machines often hold a lot more records. Using all may...

mock.isssues.com

...course of development you may need to mock HTTP responses. This is a simple service to return various HTTP responses...

You need to install the following packages before you can build the Nokogiri gem: sudo apt-get install libxml2-dev...

makandra dev

This is for people recovering from Subversion. Get an existing from the server for the first time git clone git@example.com:repositoryname See what's changed git status Check in locally...

...git commit -m "good description" Push local commits to the server git push Get and merge updates from the server git pull Stage a file for the next local commit...

We had a strange behaviour on one of our mariadb-servers: Everyday at around midnight we saw that the root-account on one of our servers is trying to access...

# journalctl -u mariadb Dec 16 00:00:03 cool-server mariadbd[788]: 2022-12-16 0:00:03 34996 [Warning] Access denied for user 'root'@'localhost' (using password...

...add the following line to your config/environments/development.rb: config.assets.compile = false config.assets.debug = false Then restart your server. This mimicks how applications work in production. Now reload your page. It will probably show...

makandra dev

...Capybara will wait for a short time before raising NoSuchElementError. This is sufficient for basic, server-rendered application. However, as frontends become more complex (more JavaScript, AJAX requests, animations), race...

...clients, we want to review all code written before it goes to the staging server. Note This process is tailored to our specific needs and tools at makandra. While it...

github.com

Weighttp is threaded and might exhaust resources of an application better than ApacheBench or httperf. You need libev installed.

jboss.org

...application framework and tools for rapid development of maintainable high performance & high scalability protocol servers & clients...

...Ruby, and it is tailored to a certain domain. In contrast, a gem usually: serves a single purpose supports several Ruby versions supports several Rails versions cannot and should not...

...tests in Cucumber with Aruba. Github Actions Github Actions is a free continuous integration service offered by Github. It runs your test suite in the background and reports test results...

...Gemfile, make sure to exclude these, if they should not be deployed to the servers. The gems of these groups might not be loaded by rails, however, the deployment process...

...will take longer as the gems will be downloaded and installed to the server. e.g. to exclude the groups cucumber and deploy, add the following to config/deploy/production.rb and config/deploy/staging.rb respectively...

...signed and accepted) SSL certificate for mywebsite.com, forward the traffic to our actual dev server. On linux, this can be achieved with these steps (instructions for Ubuntu): Resolving mywebsite.com to...

...that certificate with "caddy" Install caddy sudo apt install caddy Disable the global caddy service sudo systemctl stop caddy.service sudo systemctl disable caddy.service Create a file named Caddyfile mywebsite.com {

docs.ruby-lang.org

...argument that will be the result of that block iteration. The following method will serve as an example in the details below: def example puts yield puts 'done' return 'example...

...need to pay attention if you redirect outside of Rails, e.g. via your web server configuration. Dealing with incorrectly cached redirects The only fix is to keep redirecting the user...

This is a way to run multiple redis server on one ubuntu server. These steps you have to do only once: Adjust init script Change some Variables. From this:

...ARGS=/etc/redis/redis.conf NAME=redis-server DESC=redis-server PIDFILE=/var/run/redis.pid to this: NAME=`basename ${0}` DAEMON_ARGS=/etc/redis/${NAME}.conf DESC=${NAME} PIDFILE=/var/run/${NAME}.pid Move redis configuration ^

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...