In the name of God
This gist contains steps to setup Ubuntu 22.04 for deep learning.
| def iterate_all(iterable, returned="key"): | |
| """Returns an iterator that returns all keys or values | |
| of a (nested) iterable. | |
| Arguments: | |
| - iterable: <list> or <dictionary> | |
| - returned: <string> "key" or "value" | |
| Returns: |
| let isAlreadyFetchingAccessToken = false | |
| let subscribers = [] | |
| function onAccessTokenFetched(access_token) { | |
| subscribers = subscribers.filter(callback => callback(access_token)) | |
| } | |
| function addSubscriber(callback) { | |
| subscribers.push(callback) | |
| } |
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo| const pg = require('pg') | |
| // create a config to configure both pooling behavior | |
| // and client options | |
| // note: all config is optional and the environment variables | |
| // will be read if the config is not present | |
| var config = { | |
| user: '', // env var: PGUSER | |
| database: '', // env var: PGDATABASE | |
| password: '', // env var: PGPASSWORD |
We prefer to have audit logging in our services that leverage databases. It gives us clarity into sources of where ACL issues might originate as well as gives us a general timeline of activity in our application.
Audit logging is tedious to set up so this gist contains our latest iteration of audit logging support for a sequelize based service.
| #!/bin/bash | |
| sudo add-apt-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git -y |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| if ! type "brew" > /dev/null; then | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"; | |
| fi | |
| brew cask install vagrant; | |
| brew cask install virtualbox; |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso