(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| # 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): | |
| # |
| 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 |
| #!/bin/sh | |
| mdb-schema Acadesc.mdb postgres | sed 's/Char/Varchar/g' | sed 's/Postgres_Unknown 0x0c/text/g' | psql -h localhost -U postgres -w -d acadesc > /dev/null 2>&1 | |
| tables=$(echo -en $(mdb-schema Acadesc.mdb postgres | grep "CREATE TABLE" | awk '{ print $3 }' | sed -e 's/"//g');) | |
| for i in $tables | |
| do | |
| mdb-export -I postgres Acadesc.mdb $i | psql -h localhost -U postgres -w -d acadesc > /dev/null 2>&1 | |
| done |
| import javafx.beans.property.SimpleStringProperty; | |
| import javafx.beans.property.StringProperty; | |
| public class Person { | |
| private StringProperty firstName; | |
| private StringProperty lastName; | |
| public Person(String firstName, String lastName) { | |
| setFirstName(firstName); | |
| setLastName(lastName); |
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).
| 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; |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| ############################## | |
| ## Java | |
| ############################## | |
| .mtj.tmp/ | |
| *.class | |
| *.jar | |
| *.war | |
| *.ear | |
| *.nar | |
| hs_err_pid* |
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