Make environment variables available as Sass variables in Vue.js.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=/bin/bash | |
# to see all colors, run | |
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done' | |
# the first 15 entries are the 8-bit colors | |
# define standard colors | |
ifneq (,$(findstring xterm,${TERM})) | |
BLACK := $(shell tput -Txterm setaf 0) | |
RED := $(shell tput -Txterm setaf 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<odoo> | |
<template id="recommended_products_ext" inherit_id="website_sale.recommended_products"> | |
<xpath expr="." position="replace"> | |
<t name="Product" t-name="website_sale.recommended_products"> | |
<xpath expr="//div[@id='product_small_description']" position="before"> | |
<div class="container mt32" t-if="product.alternative_product_ids"> | |
<h3>Alternative Products:</h3> | |
<div class="row mt16" style=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Aqui es donde obtenemos la cantidad de personas | |
personas = int(input( "personas: ")) | |
#Aqui verificamos que la cantidad sea mayor a 0 si no, no tiene sentido pedir nada | |
while personas > 0: | |
#Le pedimos el nombre y lo guardamos en un input (Si usara Python 2.7 seria raw_input y no input pero usa python 3.7) | |
n = input("Su nombre por favor: ") | |
#Se pide al edad que siempre es un entero por eso el int() | |
e = int(input("Su edad en años por favor: ")) | |
#como la altura es en metros y no centimetros hay que ponerle punto y por ende es un flotante float() |
ngrok allows you to expose a web server running on your local machine to the internet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Part of Odoo. See LICENSE file for full copyright and licensing details. | |
import datetime | |
import imp | |
import json | |
import logging | |
import os | |
import re | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: ft=python | |
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico' | |
BASE_URL = 'https://YOURHOSTNAME.cern.ch' | |
DEBUG = True | |
# DISABLE_CELERY_CHECK = False | |
DB_LOG = True | |
SMTP_USE_CELERY = False | |
ROUTE_OLD_URLS = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
sudo apt-get install nodejs | |
node -v | |
npm -v |
cmd | Description |
---|---|
service fail2ban restart | restart fail2ban service (after edit configuration) |
fail2ban-client reload | restart fail2ban client |
fail2ban-client status | get list activated jail |
fail2ban-client status example: fail2ban-client status wplogin example: fail2ban-client status sshd |
get status (the number of unsuccessful attempts and the list of banned IPs) |
fail2ban-regex /var/lib/docker/containers//-json.log /etc/fail2ban/filter.d/wplogin.conf | test regex wplogin |
fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/sshd.conf | test regex sshd |
fail2ban-regex “line” “failregex” | test regex |
fail2ban-client set unbanip | manually unban IP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
[metadata] | |
name = {name} | |
version = file: {name}/_version.txt | |
author = Martin Larralde | |
author_email = [email protected] | |
url = https://github.com/althonos/{name} | |
description = {description} | |
long_description = file: README.md |