Skip to content

Instantly share code, notes, and snippets.

Avatar

Stein Inge Morisbak steinim

View GitHub Profile
View aws-terraform-workshop-preparations.md

Preparations for the workshop

Provisioning AWS Infrastructure for Security and Continuous Delivery with Terraform and Elastic Beanstalk

Requirements

Mac OSX (preferable) or Linux. If you have a Windows machine, please set up a Linux virtual machine. You can use Vagrant for this.

If you have trouble contact me at stein.inge.morisbak@bekk.no

Create a free new AWS account

@steinim
steinim / Requirements.md
Last active Nov 2, 2017
Preparations for the tutorial "Zero Downtime Deployment with Ansible"
View Requirements.md
View keybase.md

Keybase proof

I hereby claim:

  • I am steinim on github.
  • I am steinim (https://keybase.io/steinim) on keybase.
  • I have a public key whose fingerprint is E9EF F919 B726 599A 4D98 0D58 49B2 7789 0CB5 73BF

To claim this, I am signing this object:

View human_log.py
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
encoded_field = res[field].encode('utf-8')
print '\n{0}:\n{1}'.format(field, encoded_field)
@steinim
steinim / git-loglive
Created Sep 16, 2012 — forked from tlberglund/git-loglive
Log Live Git Command
View git-loglive
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
sleep 1
done
@steinim
steinim / git-gc.sh
Created Apr 18, 2012
Git garbage collection script
View git-gc.sh
#!/bin/bash
repo_dirs=$( ls -d1 $@ )
for repo_dir in ${repo_dirs[@]}
do
cd $repo_dir
echo "checking if $repo_dir is a git repo"
if [[ -d .git ]]
then
echo "Garbage collecting $repo_dir"
git gc
@steinim
steinim / pom.xml
Created Sep 11, 2011
Skipping entire sub-module
View pom.xml
...
<profiles>
...
<profile>
<id>test-data-creator</id>
<activation>
<property>
<name>!skip.test-data</name>
</property>
</activation>
View MySlowIntegrationTest.java
@IfProfileValue(name = "slowtests", value = "true")
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/applicationContext-itest.xml" })
public class MySlowIntegrationTest {
...
@Test
public void is_this_slowtest_working() {
...
}
...
@steinim
steinim / pom.xml
Created Sep 11, 2011
Surefire plugin configured for running integration tests
View pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
<argLine>${commandLineArgs}</argLine>
</configuration>
<executions>
<execution>
<id>unit-test</id>
@steinim
steinim / pom.xml
Created Sep 11, 2011
Integration property set to true in parent pom
View pom.xml
<properties>
<integration>true</integration>
...
</properties>