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 * as cdk from 'aws-cdk-lib/core'; | |
import * as ecr from 'aws-cdk-lib/aws-ecr'; | |
import { StackProps } from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import * as iam from 'aws-cdk-lib/aws-iam'; | |
import * as dms from 'aws-cdk-lib/aws-dms'; | |
import * as ec2 from 'aws-cdk-lib/aws-ec2'; | |
export class Stack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props?: StackProps) { |
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 { NextRequest, NextResponse } from 'next/server'; | |
export function middleware(request: NextRequest): Response | NextResponse { | |
const host = request.headers.get('host'); | |
if (!host) { | |
// Handle the situation where the host header is not present. | |
console.error('Host header not found.'); | |
return NextResponse.next(); | |
} |
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
alias release_notes='git log --since="1 week ago" --pretty=format:"%cd %s" --date=format:"%Y-%m-%d" --no-merges > ~/commits.txt' |
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
const AWS = require('aws-sdk'); | |
AWS.config.update({ region: 'us-west-2' }); | |
exports.handler = async (event, context, callback) => { | |
const sixMonthsAgo = new Date(Date.now() - 6 * 30 * 24 * 60 * 60 * 1000); | |
const conditionDate = sixMonthsAgo.toISOString(); | |
const ownerIds = ["REPLACE_ME"]; | |
let nextToken; |
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 { Construct } from '@aws-cdk/core'; | |
import * as cdk from '@aws-cdk/core'; | |
import * as ec2 from '@aws-cdk/aws-ec2'; | |
import * as ecs from '@aws-cdk/aws-ecs'; | |
import * as ecr from '@aws-cdk/aws-ecr'; | |
import * as elasticloadbalancing from '@aws-cdk/aws-elasticloadbalancingv2'; | |
import { CfnOutput, Duration, RemovalPolicy } from '@aws-cdk/core'; | |
const capitalize = (s: string) => { | |
return s.charAt(0).toUpperCase() + s.slice(1); |
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
sudo openconnect vpnurl.com --certificate ~/certificates/certificate.pfx |
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 | |
YEAR=$(date +"%Y"); | |
MONTH=$(date +"%B"); | |
MONDAY=$(date -v-monday +"%m-%d") | |
FRIDAY=$(date -v+friday +"%m-%d") | |
THIS_WEEK_PATH="${YEAR}/${MONTH}"; | |
THIS_WEEK_FILE_NAME="${MONDAY}_${FRIDAY}"; |
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
wget https://downloads.plex.tv/plex-media-server-new/1.21.1.3830-6c22540d5/debian/plexmediaserver_1.21.1.3830-6c22540d5_amd64.deb | |
sudo dpkg -i plexmediaserver_1.21.1.3830-6c22540d5_amd64.deb | |
sudo systemctl status plexmediaserver.service | |
sudo systemctl enable plexmediaserver.service |