Skip to content

Instantly share code, notes, and snippets.

Avatar
🌚

Patrick Michaelsen prmichaelsen

🌚
View GitHub Profile
@mattlockyer
mattlockyer / table.js
Created May 9, 2017
React Component for Draggable Re-ordering of Columns in react-table
View table.js
import React, { Component } from 'react';
import ReactTable, { ReactTableDefaults } from 'react-table';
//https://github.com/tannerlinsley/react-table
//https://react-table.js.org/
import 'react-table/react-table.css'
Object.assign(ReactTableDefaults, {
defaultPageSize: 10,
minRows: 3,
});
@rvl
rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@Hamatti
Hamatti / git_stuff.sh
Created Jan 16, 2014
Added some alias stuff to display git branch description everytime I do git status (or gs as it's aliased for me). That helps me keep on track with branches that are named like issue-[nro] or fix-[nro].
View git_stuff.sh
function parse_git_branch_name {
git rev-parse --abbrev-ref HEAD
}
function parse_git_description {
git config branch.$(parse_git_branch_name).description
}
alias gs='echo $(parse_git_branch_name): $(parse_git_description) && git status'
@sergeylukin
sergeylukin / post-receive
Last active Apr 27, 2018
Git hook (post-receive): update working tree on PUSH
View post-receive
#!/bin/sh
#
# This hook is placed in Bare repository and it updates Working tree whenever a PUSH
# is executed
#
# Assuming following file structure:
# .
# |-- myproject
# |-- myproject.git
# set WORKTREE=../myproject