Skip to content

Instantly share code, notes, and snippets.

@ameeuw23
ameeuw23 / ubuntu-server-hardening.md
Created November 13, 2022 17:23 — forked from mirajehossain/ubuntu-server-hardening.md
ubuntu-server-hardening checklist

Ubuntu-Server-Hardening

1. Secure Shared Memory

What is shared memory?

Shared memory is an efficient means of passing data between programs. Because two or more processes can use the same memory space, it has been discovered that, since shared memory is, by default, mounted as read/write, the /run/shm space can be easily exploited. That translates to a weakened state of security.

If you’re unaware, shared memory can be used in an attack against a running service. Because of this, you’ll want to secure that portion of system memory.

@ameeuw23
ameeuw23 / cheatsheet-elasticsearch.md
Created February 23, 2022 11:48 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@ameeuw23
ameeuw23 / cloudSettings
Last active July 23, 2020 20:28 — forked from sarthaksavvy/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-23T20:28:37.984Z","extensionVersion":"v3.4.3"}
@ameeuw23
ameeuw23 / post_message_example.js
Created August 8, 2019 15:47 — forked from vishaltelangre/post_message_example.js
window.postMessage example
// recieve message
// event object contains:
// - data: message sent
// - origin (host from which the message was sent, e.g. http://blah.example.com)
// - source (reference to a Window object from which message was sent)
function postMessageHandler( event ) {
console.log("We've got a message!");
console.log("* Message:", event.data);
console.log("* Origin:", event.origin);
console.log("* Source:", event.source);
@ameeuw23
ameeuw23 / README.md
Created August 3, 2019 20:30 — forked from alexellis/README.md
GitLab OAuth tester

Running the example:

base_url=https://gitlab.your-host client_secret=$client_secret client
_id=$client_id port=8081 go run main.go
2018/10/10 12:57:57 Using port: 8081
export const moviesLoaded = movies => ({
type: 'MOVIES-LOADED',
payload: movies,
});
export const loadMovies = () => dispatch =>
fetch('/movies.json')
.then(rsp => rsp.json())
.then(movies => dispatch(moviesLoaded(movies)));
@ameeuw23
ameeuw23 / AccountAuthenticator.java
Created April 29, 2018 09:03 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@ameeuw23
ameeuw23 / bitcoind
Last active February 23, 2018 23:10 — forked from rjmacarthy/bitcoind-ubuntu-install
Install Bitcoind Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: bitcoind
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bitcoind daemon startup script
# Description: bitcoind daemon startup script
### END INIT INFO
@ameeuw23
ameeuw23 / 0_reuse_code.js
Created February 7, 2017 12:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ameeuw23
ameeuw23 / README.md
Created September 7, 2016 19:47 — forked from sj26/README.md
Run MailCatcher in the background, always, on OS X

Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.

If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.

Currently pow doesn't seem to pass websockets through correctly. Looking into this.