Let's get some help from the shell.
$ cat >> ~/.bash_aliases
alias get = 'git'
alias gi = 'git'
alias got = 'git'
alias gti = 'git'
"""How many pizzas do we need?""" | |
import math | |
import sys | |
if len(sys.argv) > 1: | |
people = int(sys.argv[1]) | |
else: | |
people = int(raw_input("How many RSVPs? ")) |
It's always been frustrating to me that sqlplus
does not have REPL behavior, so you can't arrow-up through your history, etc. In addition, the default SQL prompt is not very informative. Since I often work on prod and dev databases at the same time, it is important to me that I know where I am when I am executing disastrous SQL.
Well, rlwrap
to the rescue! Plus, a handy login.sql script to customize your sqlplus
prompt. The package was available by default in RHEL6 and on OSX El Capitan. YMMV...
You'll need to do three small things, and you are good to go,
#!/bin/bash | |
# written and explained by others! | |
# https://blogs.aws.amazon.com/cli/post/Tx93V7O09I96SO/AWS-re-Invent-2015-and-more | |
# https://github.com/awslabs/awscli-reinvent2015-examples/blob/master/scripts/setup-dev-ec2-instance | |
# Note: you need "jp" installed | |
# to run this command. You can | |
# brew tap jmespath/jmespath && brew install jp | |
# to install on a Mac. |
I hereby claim:
To claim this, I am signing this object:
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
#encoding:utf-8 | |
# example of how to use https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/support/expected_conditions.py | |
from selenium import webdriver | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.common.by import By | |
import unittest |
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli | |
KEY_ID=alias/my-key | |
SECRET_BLOB_PATH=fileb://my-secret-blob | |
SECRET_TEXT="my secret text" | |
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob | |
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target | |
encrypt-text: |
javascript:(function()%7Bvar a%3Ddocument.createElement(%27style%27),b%3Bdocument.head.appendChild(a)%3Bb%3Da.sheet%3Bb.insertRule(%27a%5Brole%3Dlink%5D div%5Baria-label%5D::after,div%5Baria-label%5D%5Bdata-testid%3DpreviewInterstitial%5D::after%7Bcontent:attr(aria-label)%3Bdisplay:block%3Bbackground-color:rgba(0,0,0,.8)%3Bcolor:%23ff0%3Bfont-family:%5C%27Segoe UI%5C%27,-apple-system,BlinkMacSystemFont,Roboto,Oxygen-Sans,Ubuntu,Cantarell,%5C%27Helvetica Neue%5C%27,sans-serif%3Bpadding:1em%3Bposition:absolute%3Btop:0%3Bleft:0%3Bright:0%3Bz-index:1%7D%27,0)%3Bb.insertRule(%27%5Bdir%3Dauto%5D>svg%7Bdisplay:none%7D%27,0)%3Bb.insertRule(%27a%5Brole%3Dlink%5D div%5Baria-label%5D%7Bdisplay:contents%3Bmargin-top:unset !important%3Bmargin-bottom:unset !important%7D%27,0)%3B%7D)()%3B | |
// I can't remember where I got this. So helpful! Sorry about lack of attribution. :( |