Skip to content

Instantly share code, notes, and snippets.

View rich-nahra's full-sized avatar

Rich Nahra rich-nahra

  • Cleveland, Ohio
View GitHub Profile
@rich-nahra
rich-nahra / gist:88f8c1d4e8e298cee8022fc448e4c686
Created March 31, 2023 22:56 — forked from rkkoszewski/gist:aa531cee7126edf329b76bdd0546f502
Notes for installing XorgXrdp and Xrdp with GLAMOR support
THIS ARE MY NOTES OF BUILDING AN INSTALLING XORGXRDP AND XRDP WITH GPU ACCELERATION
TESTED ON DEBIAN 9.13
-- Build XorgXrdp with GPU acceleration ("script" - to be adjusted to your needs) : --
## << BUILD AND INSTALL SCRIPT START >> ##
#!/bin/bash
# Install Latest XRDP with XORGXRDP
# README
@rich-nahra
rich-nahra / aws-console-tips.js
Last active June 23, 2022 10:30
display's service title under mouse pointer.
// ==UserScript==
// @name aws-console-tip
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Are you using service icon only in console display settings? This will help by displaying service title under mouse pointer.
// @author Rich Nahra
// @match https://*.console.aws.amazon.com/*
// @match https://console.aws.amazon.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com
// @grant none
@rich-nahra
rich-nahra / Dockerfile
Last active May 20, 2020 14:47
streaming openpgp s3
FROM node:12.9.1-buster-slim
RUN mkdir /opt/pgp-aws
WORKDIR /opt/pgp-aws/
RUN apt-get update && apt-get install -y git gnupg2 curl nano wget time
COPY . /opt/pgp-aws/
RUN npm cache clean -f
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y gnupg2 curl nano wget
COPY docker-entrypoint.sh /usr/local/bin/
COPY mypublic.asc /tmp/mypublic.asc
COPY myprivate.key /tmp/myprivate.key
#Future move import logic to a running container instead of in the image
@rich-nahra
rich-nahra / vpn.ts
Last active October 22, 2019 11:18
import cdk = require('@aws-cdk/core');
import ec2 = require('@aws-cdk/aws-ec2');
export class DnsStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const numVpc = 1
const keyName = 'mykp' //cdk doesn't seem to have api for ec2 keypair. create manually.
const remoteSubnets = ['x.x.x.x/x']
@rich-nahra
rich-nahra / app.js
Created October 14, 2019 23:50
Lambda Mailer
var aws = require('aws-sdk');
var ses = new aws.SES();
exports.mailHandler = (event, context, callback) => {
console.log("subject" + event.subject);
var params = {
Destination: {
ToAddresses: event.to
},
Message: {
@rich-nahra
rich-nahra / CDKDockerfile
Last active September 4, 2019 11:28
vscode .devcontainer for dotnet cdk development
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM node:stretch
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ENV AWS_CLI_VERSION=1.16.230
@rich-nahra
rich-nahra / openssl_commands.md
Created May 16, 2019 14:30 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@rich-nahra
rich-nahra / open-vm-tools-vmware-ubuntu-sharing.md
Created April 28, 2019 13:05 — forked from darrenpmeyer/open-vm-tools-vmware-ubuntu-sharing.md
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work with Ubuntu 16 LTS branches and Ubuntu 17.10)

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@rich-nahra
rich-nahra / onedrive-ubu.sh
Created October 18, 2018 11:08 — forked from glmdev/onedrive-ubu.sh
A bash script to setup OneDrive integration with GNOME on Ubuntu.
#!/bin/sh
# onedrive-ubu.sh
# A BASH script to set up OneDrive integration with GNOME on Ubuntu
# Copyright (C) 2018 Garrett Mills (garrett@glmdev.tech)
# This software is licensed under the MIT License.
# This sofware is provided without warranty or even any implied intent of purpose.
#
# OnedriveD: https://github.com/xybu/onedrived-dev
#