Skip to content

Instantly share code, notes, and snippets.

View amankapoor's full-sized avatar

Aman Kapoor amankapoor

View GitHub Profile
@scrapehero
scrapehero / amazon-reviews.json
Last active February 25, 2022 23:52
Sitemap to extract data of review listings of a single product on Amazon.com using Web Scraper Chrome Extension. Instructions - https://www.scrapehero.com/amazon-review-scraper/
{
"_id": "amazon_reviews",
"startUrl": [
"https://www.amazon.com/Screen-Protector-SPARIN-Tempered-Glass/product-reviews/B013JZCAZK/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews"
],
"selectors": [
{
"id": "review",
"type": "SelectorElement",
"parentSelectors": [
@tzmartin
tzmartin / embedded-file-viewer.md
Last active March 26, 2024 06:33
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@marcosvidolin
marcosvidolin / kill_port_process.sh
Last active June 8, 2021 10:34
Linux: How to list and kill a process using a port
# to list all ports that are used
sudo netstat -ntlp | grep LISTEN
# you can obtain a specific port using the following command
sudo netstat -ntlp | grep :8080
# when you execute the command above you will see something like that
tcp 0 0 0.0.0.0:27370 0.0.0.0:* LISTEN 4394/skype
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 2216/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4912/cupsd
@adhithyan15
adhithyan15 / countdown.js
Last active April 7, 2023 19:35
A simple countdown timer in Javascript
/********************************************************************************************************************
Countdown.js is a simple script to add a countdown timer
for your website. Currently it can only do full minutes
and partial minutes aren't supported. This script is a fork of http://jsfiddle.net/HRrYG/ with some
added extensions. Since the original code that I forked was released under Creative Commons by SA license,
I have to release this code under the same license. You can view a live demo of this code at http://jsfiddle.net/JmrQE/2/.
********************************************************************************************************************/
function countdown(minutes) {
var seconds = 60;
var mins = minutes