This interactive Neo4j graph tutorial covers how to use graph analysis to find software modules that are highly centralized, making good candidates to be decomposed into microservices.
This file contains hidden or 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
| //#!/usr/bin/env objc-run | |
| #import <Foundation/Foundation.h> | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> | |
| /// | |
| /// Typedefs | |
| typedef id (^TargetMethod)(id arg); |
This file contains hidden or 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
| Plugboard = Hash[*('A'..'Z').to_a.sample(20)] | |
| Plugboard.merge!(Plugboard.invert) | |
| Plugboard.default_proc = proc { |_, key| key } | |
| def build_a_rotor | |
| Hash[('A'..'Z').zip(('A'..'Z').to_a.shuffle)] | |
| end | |
| ROTOR_1, ROTOR_2, ROTOR_3 = build_a_rotor, build_a_rotor, build_a_rotor |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <!-- All Exceptions --> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
| <BreakpointContent |
This file contains hidden or 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
| for user in $(aws iam list-users --output text --no-cli-pager | awk '{print $NF}'); do | |
| aws iam list-access-keys --user $user --output text --no-cli-pager | |
| test $? -gt 128 && exit | |
| done |
This file contains hidden or 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 | |
| #get hex codes in form #fff and #ffffff | |
| #checks to see if not - especially needed on #fff matches | |
| #FIXME: - currently prints trailing character | |
| if [[ ! -a $1 ]]; then | |
| echo File not found | |
| exit 1 | |
| fi | |
| sed ':a;N;$!ba;s/\n/ /g' "$1" | grep -o '\#[0-9a-fA-F]\{3\}[^0-9a-fA-F]' | sed 's/[^0-9a-fA-F#]//g' | sort -u |
This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.
The key point here is to specify Accept=yes, which will make the socket accept connections (behaving like inetd) and pass
only the resulting connection socket to the service handler.
This file contains hidden or 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 | |
| # Example for the Docker Hub V2 API | |
| # Returns all images and tags associated with a Docker Hub organization account. | |
| # Requires 'jq': https://stedolan.github.io/jq/ | |
| # set username, password, and organization | |
| UNAME="" | |
| UPASS="" | |
| ORG="" |