Skip to content

Instantly share code, notes, and snippets.

View grieve54706's full-sized avatar

Grieve grieve54706

View GitHub Profile
/**
* 使用步驟:
* 瀏覽器新增書籤,並在網址欄位放入以下程式碼
* 後續只要在 risu 播放影片的頁面點擊書籤即可自動下載
* 若有密碼,須先自行輸入密碼後,進入播放影片的頁面方可有效
*/
javascript: function downloadBlobs(blob){const blobUrl=new URL(blob);const url=new URL(blobUrl.pathname);const fileName=url.pathname.replace(/^\//g,"")||"video";const a=document.createElement("a");a.href=blob;a.download=`${fileName}.mp4`;a.click()}downloadBlobs(document.getElementsByTagName("video")[0].src);
@fideloper
fideloper / .zshrc
Created June 21, 2019 00:35
Defer loading of NVM to increase new terminal init speed
# Thanks to https://www.growingwiththeweb.com/2018/01/slow-nvm-init.html, modified
# for zsh as "type -t" works in bash but not zsh
# Add this to your .zshrc ...
# Defer initialization of nvm until nvm, node or a node-dependent command is
# run. Ensure this block is only run once if .bashrc gets sourced multiple times
# by checking whether __init_nvm is a function.
if [ -s "$HOME/.nvm/nvm.sh" ] && [ ! "$(type -w __init_nvm | awk '{print $2}')" = function ]; then
@elalemanyo
elalemanyo / README.md
Last active June 21, 2024 03:33
Debug zsh startup time

Debug zsh startup time

  1. Inject profiling code

    At the beginning of your .zshrc add following: zmodload zsh/zprof

    and at the end add: zprof

    This will load zprof mod and display what your shell was doing durung your initialization.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 28, 2024 14:47 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@0xjac
0xjac / private_fork.md
Last active June 28, 2024 19:27
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@hnq90
hnq90 / git-export.md
Created March 30, 2016 04:34 — forked from vanquang9387/git-export.md
git: export diff files between 2 branches/commits

We can get list of changed files between 2 branches/commits by

$ tar --ignore-failed-read -vczf archive.tgz $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT master develop)

Let's see important part:

  1. git diff-tree -r $commit_id:
    Take a diff of the given commit to its parent(s) (including all subdirectories, not just the top directory).
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active March 26, 2024 01:21
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@PurpleBooth
PurpleBooth / README-Template.md
Last active June 28, 2024 02:47
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites