Skip to content

Instantly share code, notes, and snippets.

View tomdaley92's full-sized avatar
💾
Loading...

Tom Daley tomdaley92

💾
Loading...
View GitHub Profile
@hexparrot
hexparrot / install_mineos-node
Last active October 4, 2020 03:55
Downloads, installs and configures components required for the MineOS Web User Interface on apt-get based systems using systemd.
#!/bin/sh
# update repositories
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get update
# download the necessary prerequisite components for mineos
apt-get -y install -y nodejs git rdiff-backup screen build-essential openjdk-8-jre-headless
# download the most recent mineos web-ui files from github
@narankhetani
narankhetani / postgres.docker.backup.txt
Last active March 16, 2021 02:05
How to backup a AWX postgres database in docker.
To backup:
docker exec -u <your_postgres_user> <postgres_container_name> pg_dump -Fc <database_name_here> > db.dump
To drop db (Don't do it on production, for test purpose only!!!):
docker exec -u <your_postgres_user> <postgres_container_name> psql -c 'DROP DATABASE <your_db_name>'
To restore:
docker exec -i -u <your_postgres_user> <postgres_container_name> pg_restore -C -d postgres < db.dump
working example for awx postgres database
# Maintainer: Jakub Hajek, jakub.hajek@cometari.com
#
# docker stack deploy -c stack-elastic.yml elastic
#
# The stack creates Elasticsearch cluster consiting of
# - 3 dedicated master nodes in order to keep quorum
# - 4 dedicated data nodes to manage CRUD,
#
# Docker compose file to easily deploy Elasticsearch cluster 7.x on Docker Swarm cluster.
@ashelly
ashelly / getopt.c
Last active November 9, 2023 23:22
"Port of GNU getopt() to Win32 for anyone who's tired of dealing with getopt() calls in Unix-to-Windows ports." Ported by Pete Wilson. Recovered from the Internet Archive's snapshot of www.pwilson.net/sample.html.
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@davidbalbert
davidbalbert / gist:6815258
Last active February 29, 2024 16:12
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
###########################################
# IMPORTANT NOTE:
#
# As of asuswrt-merlin 380.67 Beta, you
# can now configure SSL certificates from
# the Webui, making these instructions
# unnecessary.
###########################################
@Toakan
Toakan / Palworld-Server-FAQ-Community.md
Last active March 20, 2024 07:23
Palworld Server Community FAQ

Palworld Server Community FAQ

I've been in the #pal-server-help channel for a while now, and these same things keep coming up. So here's a one stop list of items people keep asking for.

Server Setup

Server Recommended Specs (For 8-12 Players)

  • 4x CPU cores @3.8Ghz+
  • 30GB Storage
  • 8GB RAM Base + 2GB RAM per player (If using scheduled restarts)

The default format of keys was changed in OpenSSL 1.0. From OpenSSL 1.0 change log:

Make PKCS#8 the default write format for private keys, replacing the traditional format. This form is standardised, more secure and doesn't include an implicit MD5 dependency. [Steve Henson]

Good explanations of the difference between the two formats: https://tls.mbed.org/kb/cryptography/asn1-key-structures-in-der-and-pem

Converting RSA private key:

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@coltenkrauter
coltenkrauter / README.md
Last active April 3, 2024 12:04
Toggle Airport: Disable Wi-Fi when connected to ethernet

toggle-airport

Code for disabling Wi-Fi when docking (connecting an ethernet adapter) and enabling Wi-Fi when disconnecting from ethernet.

I am using MacBook Pro 15'' with macOS Catalina.

Quick start

  1. Put toggleAirport.sh in the correct location with the right permissions (see comment at the top of the file)
  2. Put com.mine.toggleairport.plist in the correct location with the right permissions (see comment at the top of the file)
@ankurk91
ankurk91 / github_gpg_key.md
Last active April 9, 2024 16:34
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/