Skip to content

Instantly share code, notes, and snippets.

View robertpainsi's full-sized avatar

Robert Painsi robertpainsi

View GitHub Profile
@fomightez
fomightez / remove blank lines regex.md
Last active September 17, 2024 01:31
remove all blank lines using regular expressions
@robertpainsi
robertpainsi / README.md
Last active November 13, 2024 08:04
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@tuespetre
tuespetre / parent-node.js
Created October 24, 2016 19:56
A polyfill for the ParentNode interface
(function() {
var polyfill = function(prototype)
{
if (!('firstElementChild' in prototype)) {
Object.defineProperty(prototype, 'firstElementChild', {
get: function() {
var nodes = this.childNodes;
var length = nodes.length;
var current;
for (var i = 0; i < length; i++) {
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active November 11, 2024 07:00
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages