I hereby claim:
- I am ryan0x44 on github.
- I am ryan0x44 (https://keybase.io/ryan0x44) on keybase.
- I have a public key ASCsZYdRwGWRK1gYhgSx3v1G8iOsgDazCUh6pM8ePLDifwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash -e | |
# sentry_event params: [event_id] [culprit] [message] [optional:extra] | |
sentry_event() { | |
# Get current unix timestamp | |
TIMESTAMP=`date +%s` | |
# Parse DSN | |
TEMP=`echo $SENTRY_DSN | cut -d '/' -f3` |
#!/bin/bash | |
# set pw to the password you want to lookup (of course, be careful with writing this to your shell history or unencrypted disk!) | |
pw="insecure" | |
# this will output the number of times it has been pwned | |
s=$(echo -n $pw | openssl sha1 | tr '[a-z]' '[A-Z]'); curl -s "https://api.pwnedpasswords.com/range/${s:0:5}" | grep "${s:5}" | cut -d ":" -f 2 |
MD_FILE="README.md" | |
TMP_FILE=$(mktemp); pandoc $MD_FILE > $TMP_FILE; open -a "Google Chrome" $TMP_FILE && rm $TMP_FILE |
#!/bin/bash -e | |
# Using the "hello-world" image as an example | |
# https://github.com/docker-library/hello-world/blob/c83a065a24e94e635ddd518c2a3cffc91accf30d/amd64/hello-world/Dockerfile#L3 | |
# `CMD ["/hello"]` | |
docker pull hello-world | |
docker inspect -f "{{.Config.Cmd}}" hello-world | cut -f2 -d "[" | cut -f1 -d "]" | |
# produces: `/hello` |
To start a bash prompt with only Docker installed on your host OS, run the following command:
docker run --rm -v $PWD:/src -w /src -u node -it node /bin/bash
Here's what each parameter does:
--rm
removes the container once you exit
-v $PWD:/src
will mount your current host working directory into /src
inside the containerA quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.
In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.
Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.
I build my AMI's using Packer and Ansible.
public class Example1 { | |
public static void main(String[] args) { | |
int a = 0; | |
if (a >= 0) { | |
System.out.println(">= 0"); | |
if (a != 0) { | |
System.out.println("!= 0"); | |
} | |
} else { | |
System.out.println("< 0"); |