Falco is an open source product for container runtime security.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A version of querySelectorAll() that also recursively looks into all shadow roots. | |
* @param selector Selector | |
* @param root (Optional) Scope of the query (Element or Document). Defaults to the document. | |
* @returns | |
*/ | |
function deepQuerySelectorAll(selector, root) { | |
root = root || document; | |
const results = Array.from(root.querySelectorAll(selector)); | |
const pushNestedResults = function (root) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This sample template explores how we can turn the Telegram blog post on the left into an Instant View page as shown on the right — in several simple steps. If you're unsure what some of the elements used here do, check out the full documentation here: https://instantview.telegram.org/docs | |
# Place the version at the beginning of template. We recommend always using the latest available version of Instant View. | |
~version: "2.0" | |
### STEP 1: Define which pages get Instant View and which don't | |
# That's easy because we only need IV pages for posts on the Telegram blog. | |
# This *condition* does the trick. | |
# ?path: /blog/.+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com | |
### V1 | |
# wget \ | |
# --recursive \ | |
# --no-clobber \ | |
# --page-requisites \ | |
# --html-extension \ |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alter = require('../lib/alter.js'); | |
var _ = require('lodash'); | |
var Chainable = require('../lib/classes/chainable'); | |
module.exports = new Chainable('movingstd', { | |
args: [ | |
{ | |
name: 'inputSeries', | |
types: ['seriesList'] | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vars: | |
starfighters: | |
- username: patrick | |
github: patio11 | |
name: "Patrick McKenzie" | |
- username: thomas | |
github: tqbf | |
name: "Thomas Ptacek" | |
- username: erin | |
github: boboTjones |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create function that will run when a certain phrase is typed in terminal | |
# and tab key is pressed twice | |
_grunt_complete() | |
{ | |
# fill local variable with a list of completions | |
local COMPLETES=`grep -s 'grunt\.registerTask' Gruntfile.js | sed "s/\s*grunt.registerTask('\([^']*\)',.*$/\1/g"` | |
# we put the completions into $COMPREPLY using compgen | |
COMPREPLY=( $(compgen -W "$COMPLETES" -- ${COMP_WORDS[COMP_CWORD]}) ) | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First, install ncat: http://nmap.org/ncat/ | |
# Usually comes with the 'nmap' package on distributions. | |
ncat -k -v -l -p 5555 -c 'ipfs refs local | gzip' | |
# To retrieve on the client machine: | |
# nc 127.0.0.1 5555 | gunzip | ipfs pin add -r |
NewerOlder