serverless create --template hello-world
npm init
npm install dd-trace@dev
npm install serverless-plugin-datadog
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
#! /powershell/ | |
Set-StrictMode -Version Latest | |
$log = 'c:\cloudfu.txt' | |
Add-Content $log -value "Initial Execution Policy: [$(Get-ExecutionPolicy)]" | |
Set-ExecutionPolicy Unrestricted | |
Add-Content $log -value "New Execution Policy: [$(Get-ExecutionPolicy)]" | |
Add-Content $log -value "Path variable [${env:Path}]" | |
Add-Content $log -value "PSModulePath variable [${env:PSModulePath}]" |
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
#!/usr/bin/env ruby | |
require 'snmp' | |
#include SNMP | |
require 'logger' | |
require 'sensu-plugin/check/cli' | |
# Usage: Import specific MIB modules into the snmp gem mib folder | |
# - : Import specific MIB modules into the snmp gem mib folder | |
# - : Performs some SNMP Checks |
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
-- | |
-- Author: Thiago R. Santos | |
-- Create date: Aug 3rd 2008 | |
-- Description: Returns the contents of a given table | |
-- in JavaScript Object Notation. | |
-- Params: | |
-- @table_name: the table to execute the query | |
-- @registries_per_request: equivalent to "select top N * from table" | |
-- | |
-- replacing N by the actual number |
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
dockerfile: | |
policies: | |
- name: warn_latest_tag | |
enabled: true |
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
function _cdk_completer { | |
STACK_CMDS="list synthesize bootstrap deploy destroy diff metadata init context docs doctor" | |
if [ "$3" == "cdk" ]; then | |
COMPREPLY=($(compgen -W "$STACK_CMDS" $2)) | |
elif [[ -d "cdk.out" ]] && ! [[ "$2" == "-"* ]]; then | |
TEMPLATES=$(ls -1 cdk.out/*.template.json | awk '{split($0,t,/\/|\./); print t[3]}') | |
COMPREPLY=($(compgen -W "$TEMPLATES" $2)) | |
else | |
COMPREPLY=() |
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
========================= | |
# /etc/nginx/nginx.conf | |
========================= | |
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; |
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
<# | |
.SYNOPSIS | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
This module will return a [PSCredential] object from a credential stored in Windows Credential Manager. The | |
Get-StoredCredential function can only access Generic Credentials. | |
Alias: GSC |
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
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.
The key point here is to specify Accept=yes
, which will make the socket accept connections (behaving like inetd) and pass
only the resulting connection socket to the service handler.
OlderNewer