Skip to content

Instantly share code, notes, and snippets.

View steinim's full-sized avatar

Stein Inge Morisbak steinim

View GitHub Profile

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

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 / Requirements.md
Last active November 2, 2017 19:56
Preparations for the tutorial "Zero Downtime Deployment with Ansible"

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:

@steinim
steinim / git-loglive
Created September 16, 2012 08:51 — forked from tlberglund/git-loglive
Log Live Git Command
#!/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 April 18, 2012 13:07
Git garbage collection script
#!/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 / MySlowIntegrationTest.java
Created September 11, 2011 08:52
Slow test with Spring
@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 September 11, 2011 08:57
Skipping entire sub-module
...
<profiles>
...
<profile>
<id>test-data-creator</id>
<activation>
<property>
<name>!skip.test-data</name>
</property>
</activation>
@steinim
steinim / pom.xml
Created September 11, 2011 08:47
Slow task profile with activation property
<profile>
<id>slowTask</id>
<activation>
<property>
<name>!skipSlowTask</name>
</property>
</activation>
<build>
<plugins>
<plugin>
@steinim
steinim / MyIntegrationTest.java
Created September 11, 2011 08:49
Integration test with Spring
@IfProfileValue(name = "integration", value = "true")
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/applicationContext-itest.xml" })
public class MyIntegrationTest {
...
@Test
public void is_this_integration_test_working() {
...
}
...