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
# Get the name of the current script file and create a log file with the same name but with .log extension | |
$scriptName = [System.IO.Path]::GetFileNameWithoutExtension($MyInvocation.MyCommand.Name) | |
$logFile = "$scriptName.log" | |
$dateFormat = "yyyy-MM-dd HH:mm:ss" | |
# Function to write log entries with timestamp to both log file and stdout | |
function Write-Log { | |
param ( | |
[string]$message | |
) |
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
import os | |
from pathlib import Path | |
import shutil | |
from urllib.parse import urlparse | |
from dap.api import DAPClient | |
from dap.dap_types import Format, IncrementalQuery, SnapshotQuery | |
import requests | |
output_dir_base = Path("downloads") |
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
pipeline { | |
agent any | |
environment { | |
CREDENTIALS_PATH = './fake-credentials.json' | |
GCS_BUCKET = 'fake-bucket-name' | |
PROJECT_ID = 'fakeprojectid-131113' | |
DESTINATION_PATH = './' | |
} |
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 | |
# This script will dump all smartCampaign data from Marketo into a | |
# semantically valid JSON file for consumption by downstream processes | |
# Author : Chris Maggiulli ( [email protected] ) | |
echo "Script Start Time $(date)" | |
# Set script parameters | |
grant_type="client_credentials" |
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
from uuid import uuid4 | |
from datetime import datetime | |
from time import time | |
import boto3 | |
from boto3 import Session | |
from botocore.credentials import RefreshableCredentials | |
from botocore.session import get_session | |
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
0.1) Use the terminal; | |
1) Make sure there is no changes in both branches (git status); | |
2) Checkout the brach that you want to take the commit from; | |
3) Use git log to show the full number of the commit that you want to cherry pick, and copy it from the teminal; | |
4) Now checkout the branch that you want to recive; | |
5) Then write: git cherry-pick [the number of the commit that you want to take, without brackets] | |
6) You are done! or if conflicts appear resolve them manually; | |
7) Then commit the changes; |
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
resource "aws_security_group" "jobs-worker-test" { | |
name = "jobs-worker-test" | |
description = "jobs-worker-test" | |
vpc_id = data.aws_vpc.core_vpc.id | |
ingress { | |
from_port = 22 | |
to_port = 22 | |
protocol = "tcp" | |
security_groups = [aws_security_group.jobs-container.id] | |
} |
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
resource "null_resource" "run_task" { | |
count = var.run_task == "YES" ? 1 : 0 | |
triggers = { | |
timestamp = timestamp() | |
} | |
provisioner "local-exec" { | |
command = "aws ecs run-task --task-definition appdev-deactivate-canvas-enrollments-${terraform.workspace} --cluster ${data.aws_ecs_cluster.ecs_cluster.cluster_name} --network-configuration \"awsvpcConfiguration={subnets=[${join(",", data.aws_subnet_ids.subnets.ids)}],securityGroups=[${join(",", concat(data.aws_security_groups.default-container-sg.ids, data.aws_security_groups.mail-sg.ids, data.aws_security_groups.db-sg.ids, data.aws_security_groups.allow-443-outbound-sg.ids))}],assignPublicIp=DISABLED}\" --launch-type FARGATE --region us-east-1" | |
} | |
} |
NewerOlder