Skip to content

Instantly share code, notes, and snippets.

View lincolnaleixo's full-sized avatar
🌴
On vacation

lincoln lincolnaleixo

🌴
On vacation
  • Barcelona
View GitHub Profile
@lincolnaleixo
lincolnaleixo / docker.sh
Last active September 18, 2024 21:28
docker aliases
# Attach a docker
alias da="docker attach"
# Get latest container ID
alias dl="docker ps -l -q"
#This should free up quite a lot of disk space usually.
#it removes unused images.
alias dip="docker image prune"
@lincolnaleixo
lincolnaleixo / dependencies_install.sh
Created September 8, 2023 08:20
puppetter/playwright linux install dependencies
sudo apt-get install -y \
libgconf-2-4 libgbm-dev libasound2 libatk1.0-0 libc6 \
libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 \
libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 \
libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
libxtst6 ca-certificates fonts-liberation libappindicator1 \
libnss3 lsb-release xdg-utils
@lincolnaleixo
lincolnaleixo / browser.js
Last active July 4, 2023 16:24
undetectable puppeteer using headless
import puppeteer from 'puppeteer-extra'
import StealthPlugin from 'puppeteer-extra-plugin-stealth'
puppeteer.use(StealthPlugin())
const userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36'
const windowSize = [1920, 1080]
const userDataDir = './userDataDir'
const browserPath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
const browserArgs = {
headless: 'new',
#!/bin/bash
apt-get update
apt-get install -y sudo rsync ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo $VERSION_CODENAME) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null