gem 'simple_form'
rails generate simple_form:install
Finally, Simple Form support Boostrap 3. 👏
But I found it still dosen't support some components in Bootstrap 3. Or may be in the future. But I can't wait, so I find a solution to support them. It was inspired by heartcombo/simple_form#531 (comment) .
This is a final solution and I used in my project.
{{ $var }} - Echo content | |
{{ $var or 'default' }} - Echo content with a default value | |
{{{ $var }}} - Echo escaped content | |
{{-- Comment --}} - A Blade comment | |
@extends('layout') - Extends a template with a layout | |
@if(condition) - Starts an if block | |
@else - Starts an else block | |
@elseif(condition) - Start a elseif block | |
@endif - Ends a if block |
This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247
Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book
I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!
A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:
.
exports.handler = (event, context, callback) => { | |
const response = { | |
statusCode: 301, | |
headers: { | |
Location: 'https://google.com', | |
} | |
}; | |
return callback(null, response); | |
} |
# Best if added to `after.sh` so that this gets run every time the box is provisioned | |
# Adjust versions as needed; most of this script is forcing php7.2 | |
# composer won't be able to download updates with an active proxy, and will hang trying to get the newest file | |
# You may want to comment this out based on your network configuration | |
sudo bash -c 'echo "export NO_PROXY=*" >> ~/.profile' | |
sudo add-apt-repository ppa:ondrej/php -y | |
sudo apt-get update | |
sudo apt-get install php7.2-dev php7.2-xml mcrypt php-pear php-mbstring unixodbc unixodbc-dev -y --allow-unauthenticated |
- # app/views/comments/_comment.html.slim | |
li data-controller="comment" data-action="click->comment#hello" | |
= "#{comment.message} by #{comment.user.email}" |
/** | |
* !!!! This code doesn't work anymore !!!! | |
* | |
* - You can check working code on comments. I won't update this code anymore. | |
* | |
* Also, I just decided to remove this code. You can check revisions for old code. | |
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore. | |
* I don't want people keep arguing in the comments, i decided to remove this code. | |
* | |
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything. |
The following JSON goes into the user settings.json file for VSCode.
For more information see: https://blog.aggregatedintelligence.com/2021/11/gitlens-remote-provider-settings-for.html
"gitlens.remotes": [{
"regex": "https:\\/\\/(git-codecommit\\.us-west-2\\.amazonaws\\.com)\\/v1/repos\\/(.+)",
"type": "Custom",
"name": "AWS Code Commit",
"protocol": "https",