Skip to content

Instantly share code, notes, and snippets.

@ntmggr
ntmggr / muse-zsh.theme
Created February 22, 2019 07:59
zsh theme
#!/usr/bin/env zsh
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
setopt promptsubst
autoload -U add-zsh-hook
PROMPT_SUCCESS_COLOR=$FG[117]
PROMPT_FAILURE_COLOR=$FG[124]
PROMPT_VCS_INFO_COLOR=$FG[242]
$OS_DEBUG=1 TF_LOG=DEBUG terraform apply
2018/02/11 21:56:19 [INFO] Terraform version: 0.11.3 3802b14260603f90c7a1faf55994dcc8933e2069
2018/02/11 21:56:19 [INFO] Go runtime version: go1.9.1
2018/02/11 21:56:19 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2018/02/11 21:56:19 [DEBUG] Attempting to open CLI config file: /.terraformrc
2018/02/11 21:56:19 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/02/11 21:56:19 [INFO] CLI command args: []string{"apply"}
2018/02/11 21:56:19 [INFO] command: empty terraform config, returning nil
2018/02/11 21:56:19 [DEBUG] command: no data state file found for backend config
2018/02/11 21:56:19 [DEBUG] New state was assigned lineage "ef533f2b-3885-4a0a-84a2-da67eebccede"

Redhat 6 - Restricted Korn Shell

Restricted Korn Shell

Assuming that ksh is installed. If not yum install ksh Create the link

ln -sf /bin/ksh93 /bin/rksh

Make the login shell of the user point to /bin/rksh i.e.

@ntmggr
ntmggr / start_server.sh
Created July 30, 2016 10:38 — forked from gabrielengel/start_server.sh
Install Nginx, Unicorn & ruby 1.9.3
#!/usr/bin/env bash
# Setup a ubuntu 12.04 LTS machine with nginx, unicorn, ruby 1.9.3
# RUN: curl -L http://goo.gl/M8SXl | bash
mkdir ~/server ; cd ~/server
wget https://github.com/gabrielengel/chef-ubuntu/tarball/master
tar -zxf master
cd gab*
mv dna.aws-sample.json dna.json
@ntmggr
ntmggr / docker-examples.md
Created April 19, 2016 08:49 — forked from thaJeztah/docker-examples.md
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
@ntmggr
ntmggr / Run_Tunnelblick_from_MacOS_cli.md
Created December 30, 2015 09:33
Run Tunnelblick from MacOS cli

TunnelBlick from MacOS cli

Create the the OSA script and save it with .scpt extension

tell application "Tunnelblick"
    connect "Your_existing_Tunneblick_vpn_name"
    get state of first configuration where name = "Your_existing_Tunneblick_vpn_name"
    repeat until result = "CONNECTED"
        delay 1
        get state of first configuration where name = "Your_existing_Tunneblick_vpn_name"
 end repeat