SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
| # How to generate a secret key with Python | |
| # via http://flask.pocoo.org/docs/quickstart/ | |
| import os | |
| os.urandom(24) |
| #!/usr/bin/env python | |
| """ | |
| Git pre-commit hook to enforce PEP8 rules and run unit tests. | |
| Copyright (C) Sarah Mount, 2013. | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 |
| nameButton.addActionListener(new java.awt.event.ActionListener() { | |
| public void actionPerformed(java.awt.event.ActionEvent evt) { | |
| nameButtonActionPerformed(evt); | |
| } | |
| }); |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
Here at Bloomfire, we’re loving building new components with React. We’re even going all in with using ES6 modules and inline styles. (‘Inline styles?!’ I hear you say? Don’t knock it ’til you’ve tried it.)
There’s a lot of cool stuff we can do with CSS that we can’t do with inline styles, though; and that’s where Radium comes in. Radium not only provides a handy way to style :hover, :focus, and :active states, but it also deftly handles media queries. If you’re using inline styles in React and not using Radium, you should. I’ll give you a minute to go look it over – here’s the link again.
Back? Okay.
We create a style object in each of our React components, which we then reference in the JSX below. Here’s a super-stripped-down example:
// [myAwesomeButton.js]| from __future__ import absolute_import, print_function, unicode_literals | |
| import boto3 | |
| def clean_old_lambda_versions(): | |
| client = boto3.client('lambda') | |
| functions = client.list_functions()['Functions'] | |
| for function in functions: | |
| versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions'] | |
| for version in versions: |
| const uuid7Re = /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; | |
| const parseUuid7Date = (uuid) => { | |
| if (typeof uuid !== `string` || !uuid7Re.test(uuid)) { | |
| throw new TypeError(`Expected UUIDv7. Received: ${String(uuid)} (${typeof uuid})`) | |
| } | |
| const timestampHex = uuid.slice(0, 13).replace(`-`, ``) | |
| const timestamp = Number.parseInt(timestampHex, 16) | |
| return new Date(timestamp) |