Skip to content

Instantly share code, notes, and snippets.

View junguler's full-sized avatar
🌙

hossein s. borhani junguler

🌙
  • iran
  • 20:47 (UTC +03:30)
View GitHub Profile
@rkd-me
rkd-me / .md
Last active January 3, 2022 00:05
Override CSS for websites without installing add-ons in Firefox! 🦊 (notion:be29f352627d4784bdc7b630e7ce473e)
  1. Open Firefox and press Alt to show the top menu, then click on HelpTroubleshooting Information
  2. Click the Open Folder button beside the Profile Folder entry
  3. Create a folder named chrome in opened directory (must be lowercase)
  4. In the chrome folder, create a CSS file with the name userContent.css
  5. Copy the following code to userContent.csswith changes according to your needs
    @-moz-document domain(website.com) {
        div.premium-button { display: none !important; }
    }
@sanjeevtripurari
sanjeevtripurari / convertbytesto.sh
Created January 6, 2016 15:10
Shell script to convert bytes to KB, MB, GB, PB, TB
#!/bin/bash
# Give numeric value, which is in bytes
# will show all possible conversions
call_bc() {
n1=$1
n2=$2
echo "scale=4; $n1/($n2)" |bc
}
@jarun
jarun / split.py
Created May 6, 2019 15:58
Split a music track into specified sub-tracks using ffmpeg
#!/usr/bin/env python3
'''
Description: split a music track into specified sub-tracks using ffmpeg
target files are saved as variable bit-rate mp3 (lossless)
Usage: split <original_track> <track_list>
'''
import shlex
@abelcheung
abelcheung / firefox-viewsource-customize.md
Last active May 28, 2023 18:18
Customizing Firefox view-source style -- Solarized Dark theme with wallpaper

Customizing Firefox view-source style

TL;DR

  1. Open (or create) chrome/userContent.css under your Firefox profile folder
  2. Append attached CSS content and save file
  3. Toggle toolkit.legacyUserProfileCustomizations.stylesheets in Firefox about:config
  4. Restart Firefox

firefox view-source style customization

@koladilip
koladilip / phantonjs-infinite-scroll.js
Last active June 11, 2023 23:58
Scrap a webpage with Infinite scrolling using phantomjs
const phantom = require('phantom');
async function wait(timeInMills) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, timeInMills);
});
}
@artjomb
artjomb / infiniteScroll_1.py
Last active June 12, 2023 00:00
infinite scroll of stackstatus with python in phantomjs
import selenium
import time
from selenium import webdriver
browser = webdriver.PhantomJS("phantomjs")
browser.get("https://twitter.com/StackStatus")
print browser.title
pause = 3
@00001101-xt
00001101-xt / ffmpeg.md
Created November 16, 2018 08:53 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@Zren
Zren / userChrome.css
Last active February 26, 2024 07:24
Firefox userChrome.css
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/*
** In order for userChrome.css to work, you need to open `about:config` and change
** `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`.
*/
@wkarney
wkarney / infinite_scroll_scraping_selenium.py
Last active July 26, 2024 01:57
[Infinite Scroll Pages] Scraping infinite scroll pages with selenium #selenium #webscraping #python
from time import sleep
from selenium import webdriver
from bs4 import BeautifulSoup
# Headless/incognito Chrome driver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")
chrome_options.add_argument('headless')
driver = webdriver.Chrome(executable_path='CHROMEDRIVER_PATH',chrome_options=chrome_options)