Skip to content

Instantly share code, notes, and snippets.

View helloint's full-sized avatar
💭
want to fly

Wayne Mao helloint

💭
want to fly
  • Endeavor Streaming / NeuLion
  • SH
View GitHub Profile
@helloint
helloint / github-csv-url-to-link.user.js
Last active July 5, 2024 02:37
Convert URLs from plain text to links
@helloint
helloint / smartedu-download-pdf.user.js
Last active July 10, 2024 11:52
Download PDF file from smartedu
// ==UserScript==
// @name Download PDF from smartedu
// @namespace https://helloint.com
// @version 0.2
// @description Download PDF file from basic.smartedu.cn by press keyboard 'ddd'
// @author Wayne Mao
// @match https://basic.smartedu.cn/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=web.app
// @grant none
// ==/UserScript==
@helloint
helloint / migrate-gitlab-github.sh
Last active September 19, 2024 01:36
Migrate from GitLab group repos to GitHub orgs in batch
# If you have a GitLab group repos that need to migrate to GitHub, currently the best option is to create a GitHub org
GITLAB_GROUP_NAME=your_gitlab_group_name
GITLAB_DOMAIN=gitlab.com:22
GITHUB_ORG_NAME=your_github_org_name
REPOS=("repo_1" "repo_2")
for REPO_NAME in ${REPOS[@]}; do
git clone --mirror ssh://git@$GITLAB_DOMAIN/$GITLAB_GROUP_NAME/$REPO_NAME.git $REPO_NAME/.git
cd $REPO_NAME
git config --bool core.bare false
git reset --hard