Skip to content

Instantly share code, notes, and snippets.

View danielfsilva88's full-sized avatar

Daniel Ferreira Silva danielfsilva88

View GitHub Profile
import re
import asyncio
import os
from bs4 import BeautifulSoup
from bs4.element import NavigableString
from playwright.async_api import async_playwright
USERNAME = "USERNAME HERE"
PASSWORD = "PASSWORD HERE"
@svpino
svpino / sample.py
Created March 21, 2023 14:24
Web Scraping using Bright Data Scraping Browser and Playwright
import re
import asyncio
from playwright.async_api import async_playwright
USERNAME = "TYPE YOUR USERNAME HERE"
PASSWORD = "TYPE YOUR PASSWORD HERE"
HOST = "zproxy.lum-superproxy.io:9222"
URL = "https://www.svpino.com/" # USE YOUR URL HERE

Number of lines in a repo:

git ls-files | xargs wc -l

Breakdown of lines in a repo by contributor:

git ls-files | while read f; do git blame -w -M -C -C --line-porcelain "$f" | grep -I '^author '; done | sort -f | uniq -ic | sort -n
@alexpchin
alexpchin / Add_Existing_Project_To_Git.md
Created June 1, 2014 20:14
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init
@vratiu
vratiu / .bash_aliases
Last active June 26, 2024 08:15
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset