Bash script to:
- Iterate all commits made within a Git repository.
- List every object at each commit.
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines or lines starting with space in the history. | |
| # See bash(1) for more options | |
| HISTCONTROL=ignoreboth |
| import javafx.beans.value.ChangeListener; | |
| import javafx.beans.value.ObservableValue; | |
| import javafx.event.ActionEvent; | |
| import javafx.event.EventHandler; | |
| import javafx.geometry.Side; | |
| import javafx.scene.control.ContextMenu; | |
| import javafx.scene.control.CustomMenuItem; | |
| import javafx.scene.control.Label; | |
| import javafx.scene.control.TextField; |
| # This docker-compose file intent to create a multi-container application | |
| # that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon. | |
| # | |
| # Advice about this approach can be found at: | |
| # http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ | |
| # | |
| # As well discussion about another alternatives on this setup can be found at: | |
| # https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11 | |
| # | |
| # Quick reference about Docker-in-Docker can be fount at: |
Undoing the last (local) merge (and thus rewriting the history):
git reset --hard HEAD~
Reverting last commit (commits the commit of mainline before the last commit again)
git revert -m 1 HEAD
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
In Terminal
mkdir ~/.bashCopy the raw git-prompt.sh file from git contrib in to the ~/.bash directory: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
Inside ~/.bashrc or ~/.bash_profile (choose the file where you normally put any bash customizations/setup), add the lines:
| So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork git@github...my-fork.git |
HTML form with responsive web design. Furthermore it's done with CSS Flexbox, so no floats are used at all. This form layout was inspired by another pen made by Chris Coyier: http://codepen.io/chriscoyier/pen/DmnlJ
A Pen by Torben Colding on CodePen.
| # STEP 1: ENSURE COMPLETION AND PROMPT FUNCTION ARE LOADED | |
| # ======================================================== | |
| # OPTION 1: If on OSX using Homebrew: | |
| # | |
| # source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh | |
| # source $(brew --prefix)/etc/bash_completion.d/git-completion.bash | |
| # OPTION 2: If on OSX using built-in Git (also works on ZSH): | |
| # |