Skip to content

Instantly share code, notes, and snippets.

@beevelop
beevelop / gitprint.js
Created April 11, 2017 10:31
Print GitHub markdown files
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white')
document.querySelector('body').appendChild(document.querySelector('#readme'))
window.print()
@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active August 7, 2025 07:32
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@llekn
llekn / overcommit.md
Created June 9, 2017 21:02
Overcommit overview

Overcommit

Overview

Overcommit is a gem that makes easy to add, configure and run tasks on git hooks (script that are run when manipulating a git repo, for example, before making a commit).

Setup

  1. Add the gem overcommit to development environment, or install it globally on you machine with gem install overcommit
  2. On the project on which you want to use overcommit, install the git hooks provided by overcommit: overcommit --install
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active August 14, 2025 08:06
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

GitHub Markup Reference

GitHub supports a number of

@santisbon
santisbon / Search my gists.md
Last active July 19, 2025 15:46
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@heroheman
heroheman / ranger-cheatsheet.md
Last active August 16, 2025 06:01
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@YumaInaura
YumaInaura / VIM.md
Last active November 25, 2021 15:42
Vim—Edit clipboard text directly ( Example using Mac OS pbcopy / pbpaste )

Vim—Edit clipboard text directly ( Example using Mac OS pbcopy / pbpaste commands )

Ease way

Put blow line in your rc file ( e.g ~/.bashrc ~/.zshrc )

Restart your shell and hit pbvim.

function pbvim (){
@fnky
fnky / ANSI.md
Last active August 16, 2025 05:34
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@dlaehnemann
dlaehnemann / contribute_github_without_write_access.md
Last active August 11, 2024 18:55
contributing to github repo without write access: pull from origin repo, push to your own fork

Whenever I want to create pull requests to a repo that I don't have write access to, I:

  1. Fork the original repo to my account.
  2. Clone the original repo to my local machine.
  3. Add my fork as an additional remote and make it the push default.
  4. Make changes in a new branch locally.
  5. Push this branch to my fork.
  6. Create a pull request from there.