Skip to content

Instantly share code, notes, and snippets.

View dev-pmartins's full-sized avatar

Paulo Victor Martins dev-pmartins

View GitHub Profile
docker-machine create -d virtualbox [VM_NAME]
docker-machine env [VM_NAME]
eval "$(docker-machine env [VM_NAME])"
#Check if docker variables running in OS
eval
#Access docker folder (The directory have a file named as docker-compose.yml)
# Simple document example:
touch sample.txt
echo "First Line" >>| ./sample.txt
echo "Second Line" >>| ./sample.txt
echo "Third Line" >>| ./sample.txt
sed "s/Second Line/Ahahaha, apaguei abestado!/g" sample.txt
var features = [];
$.each($('#feature-overview .feature'), function(i){
scenarios = [];
$.each($($('#scenario-overview .feature')[i]).find('.panel-group .panel'), function(){
scenarios = $.merge(scenarios, [
{
name: $(this).find($('.panel-title a')).text(),
status: $(this).hasClass('passed') && 'passed' || 'failed'
}
]);
###########
# Matar todos os processos por palavra chave
# Kill A lot of process by keyword
##########
# ps auxf (Só para identar os processos por hierarquia)
# ps auxf (Just list all process orderly by hierarchy)
# grep worker (Grep ué, filtra os resultados pela palavra chave)
# grep worker (Filter output by informated keyword)
# in order: find keys by prefix on redis, filter only keys, run redis get command | filter content by key
redis-cli keys ww_product_* | awk '{print $1}' | xargs -n 1 redis-cli get | grep SAC
# Dockerfile build
## Min Command:
docker build ./ && docker create --name [container_name] -it $(docker images | awk '{print $3}' | awk 'NR==2 {print; exit}') bash && docker start [container_name] && docker exec -it [container_name] bash
## Instruction
docker build ./ && # Build image from Dockerfile ## <- [START CREATION]
docker create --name [container_name] -it $(docker images | awk '{print $3}' | awk 'NR==2 {print; exit}') bash && # Create new container, replace "[container_name]" by container name (Really?)
docker start [container_name] && # Start Container
docker exec -it [container_name] bash # Access created container
# Windows
C:\Users\[yourusername]\AppData\Local\Google\Chrome\User Data\Default
# Mac OS
/Users/[yourusername]/Library/Application Support/Google/Chrome/Default
## File: Login Data
## Open with any sqLite viewer
## Login and Passwords can be searched on "logins" table
###
# Create a bootable pendrive from command line
##
diskutil list
diskutil unmountDisk /dev/diskN
sudo dd if=/path/to/image.iso of=/dev/rdiskN bs=4k
# - - ( On debian )
# This script resolve the font case DeLaY by use capslock
## Font: https://ubuntuforums.org/showthread.php?t=1462333&page=3&p=12328951#post12328951
# Run:
xkbcomp -xkb $DISPLAY /home/$(whoami)/myxkbmap
# Open for edit the generated file, like:
sudo vim /home/$(whoami)/myxkbmap