This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.
Upgrade the system
yum -y update
import importlib | |
from mock import MagicMock, patch | |
def example(): | |
with patch_modules(): | |
import something.not.importable | |
print("yay! it worked!") | |
def patch_modules(): | |
sm = mock_import('not.importable', 'something') |
import { Queue } from "@aws-cdk/aws-sqs"; | |
import { App, Duration, Stack, StackProps } from "@aws-cdk/core"; | |
import { Runtime, Code, Function } from "@aws-cdk/aws-lambda"; | |
import { SqsEventSource } from "@aws-cdk/aws-lambda-event-sources"; | |
class DeadLetterQueue extends Stack { | |
constructor(parent: App, name: string, props?: StackProps) { | |
super(parent, name, props); |
#include <iostream> | |
#include <map> | |
using namespace std; | |
class BaseClass{ | |
public: | |
virtual int funk() { | |
return 0; | |
} |
CHANGED_FOLDERS=$(git diff --name-status $TRAVIS_COMMIT_RANGE -- | awk 'BEGIN {FS="/"} {print $1}' | awk '{print $2}' | uniq) |
anchors: | |
tf_init: &tf_init | | |
terraform init -lock=false \ | |
-backend-config="resource_group_name=terraform" \ | |
-backend-config="key=${{ env.TF_BACKEND_KEY }}" \ | |
-backend-config="access_key=${{ secrets.TF_BACKEND_ACCESS_KEY }}" \ | |
-backend-config="storage_account_name=${{ secrets.TF_BACKEND_SA }}" | |
setup_backend_key: &setup_backend_key "githubdeployment.${{ github.event.inputs.environment }}.aks_setup.terraform.tfstate" | |
configure_backend_key: &configure_backend_key "githubdeployment.${{ github.event.inputs.environment }}.aks_configure.terraform.tfstate" |
These are generic npm scripts that you can copy & paste into your package.json
file as-is and get access to convinience scripts to manage your Docker images all in one place.
npm i -g mrm-task-npm-docker
npx mrm npm-docker
Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)
/* Client side, works in Chrome 55 and Firefox 52 without transpilation */ | |
//https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/ | |
async function fetchURLs() { | |
try { | |
// Promise.all() lets us coalesce multiple promises into a single super-promise | |
var data = await Promise.all([ | |
/* Alternatively store each in an array */ | |
// var [x, y, z] = await Promise.all([ | |
// parse results as json; fetch data response has several reader methods available: | |
//.arrayBuffer() |
property idleTest : 180 -- How long to be idle (in seconds) before activating script | |
on idle_time() | |
set idleTime to (do shell script "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/1000000000; print $idle,\"\";last}'") | |
return idleTime | |
end idle_time | |
script should_run_matrix | |
set idleComp to false | |
-- this repeat loop polls the idle time every 30 seconds to determine |