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
| First, the server | |
| docker run -d --name sonarqube -p 8000:8000 -p 9000:9000 sonarqube:8.9.6-community | |
| Then login with admin:admin | |
| http://127.0.0.1:9000 | |
| Create the project and its token | |
| An example for running the scanner with docker |
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 cat /var/log/audit/audit.log | audit2why |
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
| Lo uso con expo/reactnative, pero sirve para cualquier proyecto con typescript | |
| Para agregar las traducciones, agregar al: | |
| enum Words { | |
| Después los archivos de traducciones ingles y español llorarán | |
| // I18nService.ts | |
| import * as Localization from 'expo-localization'; | |
| import { I18n } from 'i18n-js'; | |
| import { ITranslationLanguage } from '../interfaces/ITranslationLanguage'; |
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
| scoop cleanup '*' | |
| scoop cache rm '*' | |
| scoop update '*' |
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
| Thanks: https://prefetch.net/blog/2020/07/14/decoding-json-web-tokens-jwts-from-the-linux-command-line/ | |
| jq -R 'split(".") | .[0],.[1] | @base64d | fromjson' <<< $(cat "${JWT}") |
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://rachelbythebay.com/w/2020/03/07/costly/ | |
| https://blog.clubhouse.com/reining-in-the-thundering-herd-with-django-and-gunicorn/ |
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 strace -s 4096 -f $( ps ax |grep gunicorn|grep -v grep|cut -d'?' -f1|while read p; do echo "-p $p" ; done|tr '\n' ' ' ) |
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
| const dgram = require('dgram'); | |
| const message = new Buffer('Server?'); | |
| const socket = dgram.createSocket('udp4'); | |
| socket.on('listening', function () { | |
| socket.setBroadcast(true); | |
| setInterval(() => { | |
| socket.send(message, 0, message.length, 5555, '255.255.255.255'); | |
| }, 5000); | |
| }); |
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
| $ history |grep docker|awk -F' ' '{ for (i=2;i<NF;i++) printf " " $i; print " "$NF }'|grep -v history |
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
| $ git config --global --add oh-my-zsh.hide-dirty 1 |