Skip to content

Instantly share code, notes, and snippets.

@maroda
maroda / maindefault.md
Last active June 26, 2020 18:22
Change GitHub default "Master" branch to "Main"

For those who would like to change the default master branch in GitHub to something else, here using main instead:

  1. Make sure you're up-to-date: git checkout master; git fetch; git pull
  2. Rename the branch: git branch -m main
  3. Push the change: git push -u origin main
  4. No PR is needed
  5. In the GitHub UI for the REPO being changed: Settings → Branches → Default branch
  6. Select main from the drop-down menu, click Update
  7. Browse to https://github.com/USER/REPO/branches
  8. Click the red trashcan next to master
@mlafeldt
mlafeldt / x.md
Created February 16, 2016 15:48
Providing a Homebrew tap backed by private GitHub repo

First of all, install Homebrew itself.

As the tap is a private Git repo, you need to generate a GitHub token with repo scope and then add this token to your ~/.netrc file like this:

machine github.com
  login <your GitHub user>
  password <your GitHub token>
@eliquious
eliquious / README.md
Created January 4, 2016 05:01
Golang OpenPGP examples

Building

go build -o goencrypt main.go

Generating Keys

@UniIsland
UniIsland / list-manually-installed-packages.sh
Created February 8, 2014 08:20
List all manually installed packages on a debian/ubuntu system
#!/bin/bash
## List all manually installed packages on a debian/ubuntu system
## manually installed means:
## 1. not pre-installed with the system
## 2. not marked auto-installed by apt (not dependencies of other
## packages)
## Note: pre-installed packages that got updated still needs to be
## filtered out.
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: