-
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
/** | |
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. |
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; |
# -*- 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]') | |
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
# 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 link_record( | |
record_id=None, model='', record=None, | |
name_field='name', link_name=None, | |
wrap=False): | |
"""Link an existing odoo record.""" | |
assert record_id and model or record | |
name = link_name or _('View') | |
if record: | |
default = getattr(record, '_rec_name', 'Unknown') | |
name = record[name_field] or default |
sudo apt-get install dos2unix | |
dos2unix -n path/to/file path/to/file |