Skip to content

Instantly share code, notes, and snippets.

View RichardHightower's full-sized avatar

Richard Hightower RichardHightower

View GitHub Profile
@RichardHightower
RichardHightower / 1_readme-log4j-scan.md
Last active May 5, 2023 20:47
github scan for log4j

install github command line

  1. This command will run a script called install-github-cli.sh.

  2. The script will install the GitHub command line interface (CLI) onto the user's computer.

  3. The CLI will allow the user to interact with the GitHub repository from the command line.

  4. The script will download the latest version of the CLI from GitHub and install it on the user's computer.

Video 6 show notes

  • Link to this page: https://bit.ly/rickScalaClojureB62
  • Link to related video

Tags

#clojure #functionalprogramming #scala #base62 
@RichardHightower
RichardHightower / 5_video_5_show_notes.md
Last active January 12, 2023 22:53
Video 5 Show Notes

Video 5 show notes

  • Link to this page: https://bit.ly/vid5B62P2Rick

Tags

#java #functionalprogramming #scala #base62 

Base62Encoder URLShortener

Base62Encoder/Decoder written in non-functional Java

Show notes for this video - Base62Encoder/Decoder written in non-functional Java.

Base62Encoder is written using FP and non FP in Go Lang, Java, Scala, Kotlin, JavaScript, TypeScript, Clojure, Rust and Python to demonstrate and discuss FP support in different languages.

@RichardHightower
RichardHightower / aaa-readme.md
Last active December 3, 2022 00:36
Setting up aws log agent to send journalctl from DC/OS logs to Amazon Log Service

In this example, we are using Centos7, journalctl and systemctl so that we can monitor logs from DC/OS instances (masters, agents and public agents). It is useful for anyone using systemd, journald in an AWS EC2 enviroment that wants logging. The nice thing about Amazon CloudWatch is that it integrates well with Amazon EMR and Amazon Elasticsearch. (For more background on this subject see this article which covers using CloudFormation, Packr, etc. for Immutable Infrastructure to build DC/OS and deploy it to Amazon Web Services.)

We will install journald-cloudwatch-logs. We are going to setup a daemon into systemd that forwards logs to Amazon CloudWatch log streams.

This utility ***journald-cloudwat

@RichardHightower
RichardHightower / UsingGuavaFutures.md
Created April 8, 2016 17:35
Simple Example using Guava Futures

Simplest example.

    public static void main(String... args) throws Exception{


        ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(10));

        Callable<String> asyncTask = () -> {
            Thread.sleep(1000);
@RichardHightower
RichardHightower / using_cojure_from_java.md
Created April 6, 2016 19:54
Example using Clojure from Java

Normal Java project

tree
.
├── build.gradle
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
curl http://169.254.169.254/latest/meta-data/local-ipv4
@RichardHightower
RichardHightower / example.md
Created August 27, 2017 21:27
branch, push
~/github/akka-ec2-example
$ git status
On branch third-step-adding-akka-remote
Your branch is up-to-date with 'origin/third-step-adding-akka-remote'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        deleted:    userService/settings.gradle
@RichardHightower
RichardHightower / consul.md
Last active July 19, 2017 05:49
consul setup on mesos / coreos

We are having troubles talking to Mesos DNS if our Marathon application / service has two ports.

We could use mesos consul https://hub.docker.com/r/ciscocloud/mesos-consul/ but that would require a consul cluster.

The following are instructions to install consul on dcos/mesos/coreos. This may not be the best way. Coreos does have a package manager (but we don't know how to use it). At a minimum we should script this with ansible. (We are not ansible experts either).

So far, I have been unable to get mesos-consul to work but consul is running on the mesos-masters and mesos-slaves in a special snowflake fashion.