Skip to content

Instantly share code, notes, and snippets.

View zot24's full-sized avatar
🦑
boom!

zot24

🦑
boom!
View GitHub Profile
@zot24
zot24 / after.sh
Last active October 29, 2019 07:26
Laravel Homestead after.sh script
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
echo "Updating machine software"
locale-gen en_GB.UTF-8
# Updating composer
@zot24
zot24 / 2019-08-31-test-run-terragrunt.txt
Created August 31, 2019 20:30
2019-08-31-test-run-terragrunt.txt
? github.com/gruntwork-io/terragrunt [no test files]
? github.com/gruntwork-io/terragrunt/aws_helper [no test files]
=== RUN TestParseTerragruntOptionsFromArgs
=== PAUSE TestParseTerragruntOptionsFromArgs
=== RUN TestFilterTerragruntArgs
=== PAUSE TestFilterTerragruntArgs
=== RUN TestParseMultiStringArg
=== PAUSE TestParseMultiStringArg
=== RUN TestParseEnvironmentVariables
--- PASS: TestParseEnvironmentVariables (0.00s)
@zot24
zot24 / delete_resource_by_batch
Created June 26, 2019 19:15
Collection of kubectl commands that might be usefull
kubectl get deploy -n my-namespace | awk '/resque-worker/{print $1}' | xargs kubectl delete -n my-namespace deploy
relabel_configs:
- source_labels: [__address__]
regex: "([^:]+):\\d+"
target_label: instance
@zot24
zot24 / keep_container_running
Created May 29, 2019 17:50
Keep a container running by overwritting their comamnd and args on the deployment manifest
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
sudo killall -HUP mDNSResponder
import argparse
import subprocess
from string import Template
def main():
global env
global project
global secretType
global secretsFile
@zot24
zot24 / tests.yml
Created May 7, 2019 20:14
Docker Image resource type using digest on the version as a specific docker image to use
image_resource:
type: docker-image
source: {repository: golang}
version: {digest: "sha256:5f7781ceb97dd23c28f603c389d71a0ce98f9f6c78aa8cbd12b6ca836bfc6c6c"}
@zot24
zot24 / logout.blade.php
Created October 25, 2014 10:13
Logout Laravel
{{ Form::open(['route' => ['session.destroy'], 'method' => 'delete']) }}
<button type="submit">Logout</button>
{{ Form::close() }}