Skip to content

Instantly share code, notes, and snippets.

View prmichaelsen's full-sized avatar
🌚

Patrick Michaelsen prmichaelsen

🌚
  • Phoenix
  • 21:28 (UTC -06:00)
View GitHub Profile
@mattlockyer
mattlockyer / table.js
Created May 9, 2017 21:12
React Component for Draggable Re-ordering of Columns in react-table
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 February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

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 January 16, 2014 00:31
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].
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 April 27, 2018 13:38
Git hook (post-receive): update working tree on PUSH
#!/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