Skip to content

Instantly share code, notes, and snippets.

View maboloshi's full-sized avatar

沙漠之子 maboloshi

  • 17:44 (UTC +08:00)
View GitHub Profile
@r-a-y
r-a-y / _readme.md
Last active August 28, 2025 17:53
Using Git for Windows (PortableGit) with a portable HOME directory

Prologue

I develop on Windows (yeah, I hear your jeers, linux users!), so to use Git, I use Git for Windows

However, I use Git For Windows (portable version) so I can keep my dev environment centrally located. This is so I can reuse this environment simply by copying my msysgit directory to a USB drive.

Installation

@abhisekp
abhisekp / # Emojis.md
Last active October 22, 2025 22:34 — forked from rxaviers/gist:7360908
Complete list of Github :octocat: supported emojis — http://j.mp/gh-emojis
@veggiemonk
veggiemonk / .gitconfig
Last active April 14, 2025 17:24
simple zshrc config file with Oh-My-ZSH
[user]
name = Julien Bisconti
email = ******
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/vim
[alias]
wow = log --all --graph --decorate --oneline --simplify-by-decoration
@prinsss
prinsss / page.html
Created December 17, 2016 09:58
Click button to load Disqus
<a class="btn btn-default" href="javascript:disqus.load();">点击以加载 Disqus</a>
@ravibhure
ravibhure / git_rebase.md
Last active October 21, 2025 14:16
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

$('.load-gist').on('click', function() {
var gist = {
// URL 传参自己改下
url: '//gist.github.com/printempw/' + $(this).data('hash') + '.json?callback=?',
dom: this
}
// 因为 URL 中带了 `callback=?`,所以这里 jQuery 会使用 JSONP 方式请求
$.getJSON(gist.url, function(data) {
// 加载样式
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active October 23, 2025 10:14
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@Liam0205
Liam0205 / ltxtest.tex
Created August 23, 2016 04:32
minted in mdframed and tikz node, with new environment
\documentclass[UTF8, openany,twoside]{ctexbook}
\usepackage{minted}
\usepackage[tikz]{bclogo,rotating}
\usepackage{tikz}
\usepackage{mdframed}
\usepackage{geometry}
\usetikzlibrary{calc}
\DeclareGraphicsRule{.mps}{eps}{.mps}{}
@oa414
oa414 / ByeZhihuSecurity.js
Last active November 10, 2021 08:05
去除知乎点开外链的安全中心跳转
// ==UserScript==
// @name ByeZhihuSecurity
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 去除知乎点开外链的安全中心跳转
// @author Lin Xiangyu
// @match https://www.zhihu.com/*
// @grant none
// ==/UserScript==
@danieleggert
danieleggert / GPG and git on macOS.md
Last active October 2, 2025 21:19
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys