One OpenWhisk Action Calls Another
Alexa Project Name Generator on OpenWhisk
Configuring Skills
There are a bunch of good resources around for setting up skills, picking the name, configuring the “invocation” which is what to say to make the code happen, and so on. I’ll skip this section and instead just share a couple of tutorials that I rely on a lot:
- https://jordankasper.com/building-an-amazon-alexa-skill-with-node-js/
- https://medium.com/@bthdonohue/build-your-first-alexa-skill-8a37dc3103d6#.h8ftaj84z
Once your skill is configured, it’s time to write the code (note: UK users need to pick English (UK) and not English (US) as otherwise your skill will mysteriously fail in your home region. Guess how I learned that??) Continue reading
Working With Sorted Sets in Redis
One-Line Command For Newest OpenWhisk Logs
wsk activation list -l1 | tail -n1 | cut -d ' ' -f1 | xargs wsk activation logs
From left to right, sections separated by the pipe |
character, this is what happens:
- get a list of activations, limited to just one activation (it sorts the newest one first by default)
- grab only the last line of that output (there’s some extra titles and stuff in there)
- use the `cut` command with the space character as a field delimiter, and use only the first field (this gets the ID of the activation)
- get the logs of that activation
Of course it’s wrapped up in a script so I just run that from the commandline and check where I went wrong this time …
Exclude a Directory when Grepping
node-modules
folder, try this:
grep -R --exclude-dir node_modules [what to search for] *
If you’re using a different tech stack you may want to exclude a different directory (for PHP, the directory would be called vendor
), but this is a very handy tip and a bit nicer than the older approach I was using which did the whole search and then used a second grep to eliminate things by using the -v
switch.
Sewing Machine Cover
Amazon Lambda Deployment Workflow For Alexa Skill
cfenv for Easier NodeJS on Cloud Foundry
Using NPM Link to Develop Dependent Projects
npm link
command which is pretty handy. I hadn’t seen it before so this blog post is basically the cheat sheet I wrote when I started using it… Continue reading