- If behavioral analysis is required, then the kernel module is required
- The inspector agent cannot be compiled for container linux because the source code is not open
- The inspector agent is dynamically linked and therefore must be run on a supported filesystem/OS
- Therefore, the inspector agent must be run inside of a container
- Once the inspector agent in the container needs to have the correct mounts and capabilites to scan the host systems
| import boto3 | |
| import botocore | |
| import time | |
| def handler(event=None, context=None): | |
| client = boto3.client('ssm') | |
| instance_id = 'i-07362a00952fca213' # hard-code for example | |
| response = client.send_command( |
| // Ampersand-State doesn't mix in Underscore methods the way Backbone.Model does. | |
| // Technically it could also be done as a standalone mixin, but we'll do that here. | |
| var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit']; | |
| // Mix in each Underscore method as a proxy to `Model#attributes`. | |
| _.each(modelMethods, function(method) { | |
| State.prototype[method] = function() { | |
| var args = [].slice.call(arguments); | |
| args.unshift(this.attributes); |
| import {viewFromComponent} from "viewUtilities"; | |
| class MyListComponent extends React.Component { | |
| render() { | |
| // serialized Backbone collection | |
| const {items = [] } this.props; | |
| // do stuff with items | |
| } | |
| } |
| import pytesseract | |
| import sys | |
| import argparse | |
| try: | |
| import Image | |
| except ImportError: | |
| from PIL import Image | |
| from subprocess import check_output |
| const CDN = process.env['CDN_HOST'] || ''; | |
| /** | |
| * Webpack configuration for integrating Webpack with Rails via the webpack-rails gem | |
| * (https://github.com/mipearson/webpack-rails) | |
| * | |
| * Cache-Busting Strategy: | |
| * Development: Change query string of resource when content MD5 hash changes, | |
| * rewriting the asset in place but triggering rewrite of the manifest. | |
| * Production: Use MD5 hash of asset as filename, writing new assets and manifest |
While a lot of Node.js guides recommend using JWT as an alternative to session cookies (sometimes even mistakenly calling it "more secure than cookies"), this is a terrible idea. JWTs are absolutely not a secure way to deal with user authentication/sessions, and this article goes into more detail about that.
Secure user authentication requires the use of session cookies.
Cookies are small key/value pairs that are usually sent by a server, and stored on the client (often a browser). The client then sends this key/value pair back with every request, in a HTTP header. This way, unique clients can be identified between requests, and client-side settings can be stored and used by the server.
Session cookies are cookies containing a unique session ID that is generated by the server. This session ID is used by the server to identify the client whenever it makes a request, and to associate session data with that request.
*S
| #!/bin/bash | |
| ######################################################################## | |
| ################################ README ################################ | |
| ######################################################################## | |
| # | |
| # This script is here to allow the use of "git push prod v1.2.3" commands or similar. | |
| # | |
| # Push a tag to a bare repository having this file as pre-receive hook, | |
| # and you'll be able to deploy directly from command line in your local environment, |
| // simpler, faster, version that will throw a TypeError if the path is invalid | |
| // by yorick | |
| function extract(obj, key){ | |
| return key.split('.').reduce(function(p, c) {return p[c]}, obj) | |
| } | |
| extract | |
| // for example: |