- Setup the app using postgres
- Skip bundle install
- Skip test files
rails _4.2.7.1_ new myapp -T -d postgresql --skip-turbolinks -B
#!/bin/sh | |
# Use this as the command for the user script | |
# curl https://gist.githubusercontent.com/aaronromeo/a683c9810aad108fab2ae6b3bc583372/raw/medusa.sh | sh | |
# add docker | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" |
FROM cypress/included:3.3.0 | |
RUN apt-get update && apt-get install -y wget | |
ENV DOCKERIZE_VERSION v0.6.1 | |
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | |
RUN npm install cypress-image-snapshot@3.0.2 |
{ | |
"attachment":{ | |
"type":"audio", | |
"payload":{ | |
"url":"https://petersapparel.com/bin/clip.mp3" | |
} | |
} | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Field conversion using the django rest framework
has not been overly intuitive. This might help
Also see this example from the documentation.
from django.core.mail import EmailMessage | |
email = EmailMessage( | |
# subject='', | |
# body='', | |
from_email='from@example.com', | |
to=['to+1@example.com', 'to+2@example.com'], | |
bcc=['bcc@example.com'], | |
headers={ | |
'X-MC-Template': 'template-slug', |
Working though some stuff with shell plus I had a multi-line function that I needed to debug. I came across %cpaste
which is a handy magic function exposing the capability to be able to drop a block of code into ipython
or shellPlus
.