Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| #!/bin/bash | |
| # Production Docker Host Hardening Script v2 | |
| # For Ubuntu Server 24.04 LTS (Noble) | |
| # Suitable for both Kamal deployment and builder hosts | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # --- Constants --- |
| # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| # Activate the gem you are reporting the issue against. |
| Rails.application.routes.routes.map {|r| r.defaults[:controller] }.compact.reject {|r| r.include? 'devise' }.map(&:camelize).constantize |
| find -name '*.png' -print0 | xargs -0 optipng -o7 |
| .opening { | |
| min-height: 200px; | |
| display: flex; | |
| justify-content: center; | |
| flex-direction: column; | |
| color: red; | |
| } | |
| .opening a { | |
| color: red; |
| input = [ | |
| 'Writing Fast Tests Against Enterprise Rails 60min, Overdoing it in Python 45min', | |
| 'Lua for the Masses 30min', | |
| 'Ruby Errors from Mismatched Gem Versions 45min', | |
| 'Common Ruby Errors 45min', | |
| 'Rails for Python Developers lightning', | |
| 'Communicating Over Distance 60min', | |
| 'Accounting-Driven Development 45min', | |
| 'Woah 30min', | |
| 'Sit Down and Write 30min', |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"> | |
| <script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script> | |
| <style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
| <body> | |
| <div style="max-width:900px; -webkit-transform:rotate(0deg)"> | |
| <scene id="scene1"> | |
| <label t="translate(0,346)"> |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
| require 'test_helper' | |
| class DocumentsControllerTest < ActionController::TestCase | |
| test "Uploading a file" do | |
| file_path = File.join(Rails.root, 'tmp', SecureRandom.uuid) | |
| File.open(file_path, 'w+b') { |f| f.write "A random file used for testing attachments!" } | |
| file = Rack::Test::UploadedFile.new(file_path, 'text/plain') | |
| post :create, {file: file} | |
| assert_response :success | |
| assert_equal(Document.last.file, 'A random file used for testing attachments!') |
| require 'rails_helper' | |
| describe DocumentsController do | |
| describe '#create' do | |
| it 'persists a file' do | |
| file_path = File.join(Rails.root, 'tmp', SecureRandom.uuid) | |
| File.open(file_path, 'w+b') { |f| f.write "A random file used for testing attachments!" } | |
| file = Rack::Test::UploadedFile.new(file_path, 'text/plain') | |
| post :create, {file: file} | |
| expect(Document.last.file).to eql 'A random file used for testing attachments!' |