Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| Phoenix esbuild with Tailwind+Fontawesome |
| CarrierWave.configure do |config| | |
| if Rails.env.test? || Rails.env.cucumber? | |
| config.storage = :file | |
| config.enable_processing = false | |
| else | |
| config.asset_host = Rails.application.secrets.asset_host | |
| config.fog_provider = 'fog/openstack' | |
| config.fog_credentials = { | |
| provider: 'OpenStack', | |
| openstack_auth_url: 'https://api.selcdn.ru/v3', |
| alias gs='git status ' | |
| alias ga='git add ' | |
| alias gb='git branch ' | |
| alias gc='git commit' | |
| alias gd='git diff' | |
| alias gco='git checkout ' | |
| alias gp='git push ' | |
| alias gpf='git push --force ' | |
| alias gpr='git pull --rebase ' |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| CarrierWave.configure do |config| | |
| if Rails.env.development? || Rails.env.test? | |
| config.storage = :file | |
| else | |
| config.storage = :fog | |
| config.fog_credentials = { | |
| :provider => 'OpenStack', | |
| :openstack_auth_url => 'https://auth.selcdn.ru/v1.0', | |
| :openstack_username => Rails.application.secrets.openstack_username, | |
| :openstack_api_key => Rails.application.secrets.openstack_api_key |
| $ wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2 | |
| $ tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2 | |
| $ mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf | |
| // In case you got the issue | |
| // wkhtmltopdf: error while loading shared libraries: | |
| // libfontconfig.so.1: cannot open shared object file: No such file or directory | |
| // | |
| // run the command below: | |
| $ yum install urw-fonts libXext libXrender fontconfig libfontconfig.so.1 |
| (eval-after-load "hideshow" | |
| '(add-to-list 'hs-special-modes-alist | |
| `(ruby-mode | |
| ,(rx (or "def" "class" "module" "{" "[")) ; Block start | |
| ,(rx (or "}" "]" "end")) ; Block end | |
| ,(rx (or "#" "=begin")) ; Comment start | |
| ruby-forward-sexp nil))) |
| # First attempting to use Capybara directly, you will ran into issues when trying to set HTTP header. | |
| # Using Basic HTTP Authentication requires that we needed to set the header. | |
| # Also we need to set the Content-Type and Accept headers to ensure that Rails handles the input and output correctly. | |
| # When using Rack, Capybara delegates request and response handling down to Rack::Test. | |
| # So I used Rack::Test directly in my step definitions, and it works. | |
| # Rack::Test has a module called Rack::Test::Methods that can be mixed into a class to provide it | |
| # with methods for get, post, put, delete as well as last_request, last_response, header and more. | |
| # I mixed Rack::Test::Methods into the Cucumber world at the top of our API steps file like so: | |
| ############################## |