Skip to content

Instantly share code, notes, and snippets.

@PrathameshSam
PrathameshSam / log_file_analyzer.sh
Last active March 19, 2021 12:22
Simple Unix script to fetch unique IP and corresponding user agents from a log file
#!/bin/bash
log_file=$1
if [ $# -eq 1 ]
then
output=`cat $1 | cut -d " " -f 1 -f 12- | uniq`
echo "$output"
else
echo "No file passed! Or too many files passed"
fi
<!--
Go to your YouTube video.
Click Share
Copy The link: https://youtu.be/rW_Zjdnzc1k
Grab the id from Video. In the example above, it would be rW_Zjdnzc1k
replace the xxx in the code below with the id from the previous step
paste the code on Page.
Boatdrinks for all!!!
-->
@javimata
javimata / page-brands.liquid
Created February 8, 2021 23:13
Pages Brands - SHOPIFY
<div class="brands-page">
{% if section.settings.display_brands %}
<div class="brands-container container mb__40">
<div class="brands-row row">
{% for block in section.blocks %}
{% if block.settings.brand_link != blank %}
@rendyanthony
rendyanthony / Install_ADE_on_Fedora.md
Last active April 27, 2024 16:43
Install Adobe Digital Editions (ADE) and Calibre DeDRM on Fedora
@programingcorner
programingcorner / E-Commerce price Comparison using python with gui.py
Created January 6, 2021 17:57
Monitoring price comparison for a particular product on different e-commerce websites using Python. Particular we use beautiful Soup for scraping data from different website like amazon, flipkart ,ebay, olx etc. and with that we provide direct link to different website of our same search product . program description . we are using python tkint…
from tkinter import *
from tkinter import Scrollbar
from bs4 import BeautifulSoup
import requests
import webbrowser
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
# import manan as m
flipkart=''
ebay=''
@tkadlec
tkadlec / perf-diagnostics.css
Last active June 8, 2023 17:47
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@cheadrian
cheadrian / Youtube_Livestream_Parts_download.py
Last active January 18, 2022 21:08
Download Youtube Live streamed video from the start or selected time
#With the help of this script you can download parts from the Youtube Video that is live streamed, from start of the stream till the end
import urllib.request
import os
#E.G: "https://r4---sn-gqn-p5ns.googlevideo.com/videoplayback?expire=1603041842& ..... 2.20201016.02.00&sq="
#The sound link should contain: &mime=audio in it.
#Here's an example from NASA LIVE:
#VIDEO: https://r5---sn-gqn-p5ns.googlevideo.com/videoplayback?expire=1603165657&ei=eQmOX8TeFtS07gO1xLWwDA&ip=79.115.11.159&id=DDU-rZs-Ic4.1&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160&source=yt_live_broadcast&requiressl=yes&mh=PU&mm=44%2C29&mn=sn-gqn-p5ns%2Csn-c0q7lnsl&ms=lva%2Crdu&mv=m&mvi=5&pl=20&initcwndbps=1350000&vprv=1&live=1&hang=1&noclen=1&mime=video%2Fmp4&gir=yes&mt=1603143920&fvip=5&keepalive=yes&fexp=23915654&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Clive%2Chang%2Cnoclen%2Cmime%2Cgir&sig=AOq0QJ8wRQIgQMnxy1Yk3HLTpqbOGmjZYH1CXCTNx6u6PgngAVGi4EQCIQDWyaye-u_KGyVQ0HRUsyKVaAzyXbmzDqOGVGpIyP7VtA%3D%3D&lspa
from flask import Flask,request, url_for, redirect, render_template
import requests
from bs4 import BeautifulSoup
import pprint
import smtplib
from email.message import EmailMessage
import csv ### For storing all the information of name,price,desired price,links and email in a csv file
import schedule
import time
@johnmurch
johnmurch / links-console.js
Created September 11, 2020 01:35
PASTE INTO CHROME CONSOLE
@alirezamika
alirezamika / autoscraper-examples.md
Last active April 26, 2024 05:08
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)