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
services: | |
sonarqube: | |
container_name: sonarqubeTraining | |
image: sonarqube | |
depends_on: | |
- sonarqube-database | |
environment: | |
- SONARQUBE_JDBC_USERNAME=sonarqube | |
- SONARQUBE_JDBC_PASSWORD=sonarpass | |
- SONARQUBE_JDBC_URL=jdbc:postgresql://sonarqube-database:5432/sonarqube |
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
import time | |
import random | |
class CircuitBreaker: | |
def __init__(self, max_failures=3, retry_timeout=5): | |
self.max_failures = max_failures | |
self.retry_timeout = retry_timeout | |
self.failure_count = 0 |
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 du -h -d 1 / 2>/dev/null | sort -hr | head -n 10 | |
df -h | |
du -sh | |
docker ps -a --format "table {{.Names}}\t{{.Status}}" | |
sudo du -h -d 1 /var 2>/dev/null | sort -hr | head -n 10 | |
sudo du -h -d 1 /var/lib 2>/dev/null | sort -hr | head -n 10 |
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
openssl rand -base64 12 | |
openssl rand -hex 12 | |
mvn quarkus:dev -Dquarkus.enforceBuildGoal=false |
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
icacls "H:\DOC\Documents" /grant "IUSR":(OI)(CI)R | |
icacls "H:\DOC\Documents" /grant "IIS_IUSRS":(OI)(CI)R | |
iisreset |
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
use <db> | |
SELECT | |
s.name AS esquema, | |
o.name AS objeto, | |
o.type_desc AS tipo_objeto, | |
m.definition AS codigo | |
FROM | |
sys.sql_modules m | |
INNER JOIN sys.objects o ON m.object_id = o.object_id |
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
# Load Angular CLI autocompletion | |
source <(command ng completion script) | |
# Luego los alias | |
alias ng="winpty ng.cmd" | |
alias npm="winpty npm.cmd" | |
alias npx="winpty npx.cmd" | |
#alias pnpm="winpty pnpm.CMD" | |
alias ll="ls -lhFac --color=auto" | |
# l = long |
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
import { useLayoutEffect, useState } from 'react'; | |
import './App.css'; | |
function App() { | |
const [browsers, setBrowsers] = useState({}); | |
useLayoutEffect(() => { | |
function getBrowserVersion(userAgentString, regex) { | |
const match = userAgentString.match(regex); | |
if (match) { |