Skip to content

Instantly share code, notes, and snippets.

View harupong's full-sized avatar

Haruo Nakayama harupong

View GitHub Profile
@nneonneo
nneonneo / youtube-dl.py
Last active January 21, 2024 13:58
YouTube-DL for Pythonista - download YouTube videos on your iPhone/iPad!
#!python3
'''
Directions:
- install yt-dlp via Pip (e.g. using (StaSh)[https://github.com/ywangd/stash] - `pip install yt-dlp`)
- add this script as a Share extension through Settings -> Share Extension Shortcuts
- while watching a video in the YouTube site or app, just share the video to Pythonista and select this script
- the video will download, and when it's done you can share the video file itself with any app (e.g. VLC)
Advanced usage:
@thefranke
thefranke / RSS.md
Last active March 16, 2024 00:16
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active March 28, 2024 00:38
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@AgentOak
AgentOak / youtube_formats.md
Last active March 28, 2024 06:21
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
#!/bin/bash
# Copyright (C) 2016 Fredrik Lundhag - f@mekk.com
# Simple script to get VPS bandwidth usage into collectd with the exec plugin.
# Should work for all VPS providers that uses SolusVM for VPS control panel.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@Spencer-Easton
Spencer-Easton / exportSpreadsheet.gs
Last active March 21, 2024 00:43
Example on how to export a Google sheet to various formats, includes most PDF options
function exportSpreadsheet() {
//All requests must include id in the path and a format parameter
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export
//FORMATS WITH NO ADDITIONAL OPTIONS
//format=xlsx //excel
//format=ods //Open Document Spreadsheet
//format=zip //html zipped
@thisismitch
thisismitch / le-renew-webroot
Last active January 5, 2021 15:20
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@ryane
ryane / five_minutes.yml
Created February 24, 2015 15:15
five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: user@example.com
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub
@takahashim
takahashim / gist:ca5909eb26d921532661
Last active August 29, 2015 14:14
技術解説書向け用字用語(案)
# 原則として開く用語。修正前→修正後
敢えて→あえて
当たって→あたって
余り→あまり
予め→あらかじめ
有り→あり
或いは→あるいは
如何→いかが
幾つか→いくつか
致し→いたし
@elvisw
elvisw / mirrorlist.mingw32
Last active January 20, 2022 22:43
MSYS2国内源
##
## 32-bit Mingw-w64 repository mirrorlist
## Changed on 2014-11-15
##
##中国科学技术大学开源软件镜像
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686
##北京理工大学镜像
Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686
##日本北陆先端科学技术大学院大学 sourceforge 镜像
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686