Skip to content

Instantly share code, notes, and snippets.

View mac-setup.sh
#!/bin/bash
# Install apps, packages, etc.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
brew tap homebrew/cask-versions
brew cask install iterm2
brew install zsh
View .gitmessage
Eyal| | TICKET-# |
Co-authored-by: <name> <name@example.com>
View git-config-global-values.sh
#!/bin/bash
git config --global user.name 'Eyal Golan'
# git config --global user.email "the@email"
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.ci 'commit -v'
git config --global alias.br branch
git config --global alias.cob 'checkout -b'
git config --global alias.por 'push -u origin'
View Matchers.java
import java.util.Date;
import java.util.List;
import org.hamcrest.CustomTypeSafeMatcher;
import org.hamcrest.Matcher;
import com.eyalgo.rssreader.model.FeedData;
import com.eyalgo.rssreader.model.FeedItem;
public class Matchers {
View RuleTest.java
public class RuleTest {
@Rule
public TemporaryFolder tmpFolder = new TemporaryFolder();
@Test
public void shouldCreateNewFileInTemporaryFolder() throws IOException {
File created = tmpFolder.newFile("file.txt");
assertTrue(created.isFile());
@eyalgo
eyalgo / build.gradle
Created Nov 29, 2018
Gradle template for spring boot. Showing how to use integration tests as well
View build.gradle
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
springDataVersion = '2.1.2.RELEASE'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
View git-nb.sh
# Add to %PATH%
# Can run: git nb MY_BRANCH_NAME
#!/bin/sh
git checkout master
git pull
git checkout -b $1
git push -u origin $1
View rebase-master-to-release.sh
#!/bin/sh
git checkout release
git rebase master release
git push
View rebase-branch-to-master.sh
#!/bin/sh
if [ -z "$1" ]
then
echo "Branch name is missing"
else
# Go to relevant branch
git checkout $1
# fetch everything
View rebase-master-with-feature-branch.sh
#!/bin/sh
# Go to relevant branch
git checkout $1
# fetch everything
git fetch
#rebase interactive
git rebase -i origin/master
You can’t perform that action at this time.