Skip to content

Instantly share code, notes, and snippets.

View junguler's full-sized avatar
🌙

hossein s. borhani junguler

🌙
  • iran
  • 21:42 (UTC +03:30)
View GitHub Profile
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active April 27, 2024 19:04
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@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; }
    }
@qzm
qzm / aria2.conf
Last active April 27, 2024 04:59
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@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);
});
}
@wkarney
wkarney / infinite_scroll_scraping_selenium.py
Last active May 5, 2023 17:04
[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)
@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

@pirate
pirate / strip_bad_filename_characters.sh
Last active February 23, 2024 21:36
Bash script to remove accents and special characters from filenames recursively.
#!/usr/bin/env bash
# Recursively remove all special characters from filenames by renaming them to their ASCII normalized forms.
#
# By default it does a dry run, to actually move the files uncomment the `mv -vi ...` line.
#
# This is useful for cleaning up network shares that will be shared via SMB/NFS between Unix/macOS/Windows
# where non-ASCII filenames can sometimes cause "file does not exist" errors when trying to access the files.
#
# This script removes leading/trailing whitespace in filenames and replaces accents and non-english
# characters with their ASCII equivalent, if no ASCII equivalent exists, it removes the character e.g.:
@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
@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`.
*/
@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: