bin/rails g migration AuthlogicToDevise
- (see the file below for the actual migration,
authlogic_to_devise.rb
) bin/rake db:migrate
gem "devise", "~> 2.2.0"
bundle install
Optimizing the delivery of CSS is one way to improve user experience, load speed and SEO of your web app. This involves determining the "critical path CSS" and embeding it into the html of your page. The rest of the CSS for the site is loaded asynchronously so it does not block the rendering of your "above the fold" content. This Gist will show you how to dynamically generate critical path CSS for your Rails app.
In this example we will use the mudbugmedia/critical-path-css gem.
You will need to set up caching and Active Job in your Rails app. I recommend using a thread-safe background job manager like resque.
# listen on port 80, and redirect to port 443 | |
server { | |
listen 10.0.0.131:80; | |
server_name unifi01.int.unixathome.org; | |
error_log /var/log/nginx-unifi01.int.unixathome.org.error.log info; | |
access_log /var/log/nginx-unifi01.int.unixathome.org.access.log combined; |
Download the XenServer 6.2.0 ISO image
Format a USB stick using FAT32.
Use unetbootin to install the ISO to the USB stick. Use the “DiskImage” option instead of the “Distribution” one, and point it right to the ISO file.
Now we need to fix up some boot stuff (All paths are relative to the root of the USB drive)
#!/usr/bin/env bash | |
set -e | |
if [ -e static ]; then | |
rm -r static | |
fi | |
mkdir -p static | |
sass src/sass/main.scss > static/application.css | |
$(npm bin)/browserify src/js/main.js > static/application.js |
Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.
wsl --update
to make sure you are running the latest WSLsudo apt-get install openssh-server
sudo systemctl enable --now ssh
to automatically start ssh when WSL starts.