sass usage guide
Anyone who has studied CSS knows that it is not a programming language. You can use it to develop web page styles, but you can't program with it. In other words, CSS is basically a designer's tool, not a programmer's tool. In the eyes of programmers, CSS is a very troublesome thing. It has no variables and no conditional statements. It is just ...
Added by Matt Kindig on Fri, 18 Feb 2022 11:54:45 +0200
Build Rails development environment
Even for experienced developers, it takes several twists and turns to install Ruby, Rails, and related software.
These problems are caused by the diversity of the environment. Different operating systems, version numbers, text editors, etc. will lead to different environments.
For developers with Rails development experience, most of them wil ...
Added by djfox on Thu, 17 Feb 2022 23:58:46 +0200
Vmware deploys Nginx+KeepAlived cluster dual master architecture
preface
Using nginx for load balancing, as the front-end or middle tier of the architecture, with the increasing traffic, it is necessary to make a highly available architecture for load balancing, and use keepalived to solve the single point risk. Once nginx goes down, it can quickly switch to the backup server.
Possible problems and solutio ...
Added by hach22 on Wed, 15 Dec 2021 04:35:33 +0200
208 block, proc and lambda in Ruby [Rails backend development training camp]
1 what is Block
Ruby's concept of block is also called closure in other languages. In essence, a block is the same as a method, except that it has no name and does not belong to an object. A block is a piece of code that accepts parameters and returns values and is always called by passing it to a method. The expressions are block, proc and la ...
Added by st0rmer on Thu, 25 Nov 2021 01:50:13 +0200
[Ruby] Block, Proc, Lambda in Ruby
In Ruby, it is easy to get confused (not good at learning), and the questions often asked in interviews are:
"Please explain what Block, Proc and Lambda are" "Difference between do... end in Block and curly bracket {}" "Please explain the difference between Proc and Lambda" "Why does the Rails scope use La ...
Added by brain on Mon, 25 Oct 2021 06:42:48 +0300
Redis cluster construction
brief introduction
Redis cluster adopts P2P mode, which is completely decentralized, and there is no central node or proxy node;Redis clusters do not have a unified portal. When client s connect to the cluster, they can connect to any node in the cluster. Nodes in the cluster communicate with each other (PING-PONG mechanism), and each node is ...
Added by denhamd2 on Fri, 01 Oct 2021 02:43:32 +0300
[ruby on rails] adapt the screen size and load different pages or css
1. Load different pages
When the screen size is larger than 600, load index2 If the screen size is less than 600, load index1
$(function() {
//Determine screen width
var winWide = window.screen.width; //Get current screen resolution
alert(winWide);
var wideScreen = false;
if (winWide <=600) { //Re ...
Added by westexasman on Sun, 05 Sep 2021 08:35:11 +0300
Python crawler - Prince oriented programming.
Python web crawler and information extraction.
Article directory
Python web crawler and information extraction.
Tools.
Requests library.
Installation.
Main methods of Requests library.
requests.request()
GET() method.
Two important objects of Requests library.
The Response object returns the c ...
Added by flyingeagle855 on Sun, 15 Mar 2020 13:36:59 +0200
Should I use alias or alias? Method?
I found a blog post about alias alias_method. As the example in this blog post shows, I just want to alias another method in the same class. Which should I use? I always see using alias, but someone told me that alias_method is better.
Use of aliases
class User
def full_name
puts "Johnnie Walker"
end
alias name full_name
end
...
Added by rosegarden on Fri, 28 Feb 2020 11:58:23 +0200
Travis CI monitors github warehouse changes and deploys to ECS
Preface
In the previous blog, we mainly talked about how to deploy hexo to the cloud server locally, but we don't want to write an md file locally and then deploy the server once. How to deploy it automatically?The answer is Travis CI
thinking
1. Create a new public warehouse in our github warehous ...
Added by wit77 on Sun, 23 Feb 2020 08:46:21 +0200