-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
# -*- coding: utf-8 -*- | |
# Inspired by https://github.com/turlando/airhead/blob/master/airhead/broadcaster.py | |
import click | |
import os | |
import shouty | |
import sys | |
import logging | |
logger = logging.getLogger('[broadcaster]') | |
/** | |
Adds a search input to JIRA board quick filters to search for a project. | |
Installation: copy the snippet into a bookmark. | |
Usage: click on the bookmark while on a JIRA board. | |
Behavior: type a project name and hit enter. | |
If a proj is found on the page the others will be hidden. | |
To restore all the projects, wipe the text and hit enter. |
<?xml version="1.0" encoding="utf-8" ?> | |
<odoo> | |
<template id="summernote" name="My summernote assets" inherit_id="web_editor.assets_editor"> | |
<xpath expr="//script[last()]" position="after"> | |
<script type="text/javascript" src="/my_mod/static/js/summernote_overrides.js"></script> | |
</xpath> | |
</template> | |
</odoo> |
# place this into /usr/share/icecast2/web/json.xsl | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
<xsl:output omit-xml-declaration="yes" method="text" indent="no" media-type="text/javascript" encoding="UTF-8"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="/icestats">{ | |
<xsl:for-each select="source"> | |
"<xsl:value-of select="@mount"/>":{ | |
"server_name":"<xsl:value-of select="server_name"/>", | |
"listeners":"<xsl:value-of select="listeners"/>", | |
"description":"<xsl:value-of select="server_description"/>", |
def _check_class_direct_func(instance, func_name): | |
"""Check if given instance class has defined a specific function directly.""" | |
# TODO: this should work on normal python classes but not on components. | |
# if func_name in vars(instance.__class__): | |
# return inspect.isfunction(vars(instance.__class__)[func_name]) | |
# FIXME this is not working either because: | |
# (Pdb++) instance.__class__ | |
# <class 'odoo.addons.component.core.sftp.adapter'> |
# -*- coding: utf-8 -*- | |
# based on this code | |
# http://code.activestate.com/recipes/577423-convert-csv-to-xml/ | |
# convert Odoo csv files in xml files | |
# csv is easy to maintain but xml data have noupdate feature | |
# Limitations: | |
# - relation field One2many is NOT supported | |
# - csv should have 'id' as first column |
[run] | |
omit = | |
*/tests/* | |
*__manifest__.py | |
[pytest] | |
filterwarnings = | |
error | |
ignore::DeprecationWarning |
/* Copyright 2016-2017 LasLabs Inc. | |
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | |
*/ | |
odoo.define('website_form_recaptcha.recaptcha', function (require) { | |
"use strict"; | |
var ajax = require('web.ajax'); | |
var snippet_animation = require('website.content.snippets.animation'); | |
var form_builder_send = snippet_animation.registry.form_builder_send; |
class WebsiteConfigSettings(models.TransientModel): | |
"""Override website config model.""" | |
_inherit = "website.config.settings" | |
my_new_field = fields.Char( | |
string='My field', | |
related='website_id.my_new_field' |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID