Skip to content

Instantly share code, notes, and snippets.

#v1
def materials_collection
elems = _context.materials.map do |value, title|
{ title: title, value: value}
end
sort_array(elems, _context.materials.size, 'materials')
end
def styles_collection
elems = _main_style_tag_category.tags.published.map do |tag|
#v1
def materials_collection
elems = _context.materials.map do |value, title|
{ title: title, value: value}
end
sort_array(elems, _context.materials.size, 'materials')
end
def styles_collection
elems = _main_style_tag_category.tags.published.map do |tag|
```
#v1
def materials_collection
elems = _context.materials.map do |value, title|
{ title: title, value: value}
end
sort_array(elems, _context.materials.size, 'materials')
end
def styles_collection
` #v1
def materials_collection
elems = _context.materials.map do |value, title|
{ title: title, value: value}
end
sort_array(elems, _context.materials.size, 'materials')
end
def styles_collection
elems = _main_style_tag_category.tags.published.map do |tag|
#v1
def materials_collection
elems = _context.materials.map do |value, title|
{ title: title, value: value}
end
sort_array(elems, _context.materials.size, 'materials')
end
def styles_collection
elems = _main_style_tag_category.tags.published.map do |tag|
### Nginx ###
check process nginx with pidfile /opt/nginx/logs/nginx.pid
# start program = "/etc/init.d/nginx start"
start program = "/opt/nginx/sbin/nginx"
# stop program = "/etc/init.d/nginx stop"
stop program = "kill -s USR2 `cat /opt/nginx/logs/nginx.pid`"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>