Skip to content

Instantly share code, notes, and snippets.

View jroneil's full-sized avatar

Joseph ONeil jroneil

  • Massachussetts
View GitHub Profile
@jroneil
jroneil / GraphQLTutorial.txt
Created February 12, 2023 11:23
GraphQL Tutorial
Day 1: Introduction to GraphQL
What is GraphQL and how is it different from REST?
GraphQL concepts: schemas, types, queries, mutations, subscriptions
Setting up a GraphQL server using a library such as Apollo Server
Resources:
The official GraphQL website (https://graphql.org/learn/)
How To GraphQL (https://www.howtographql.com)
Day 2: Queries and Mutations
@jroneil
jroneil / loony.ttl
Created August 4, 2021 16:28
loony.ttl
PREFIX : <http://looneytunes-graph.com/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# Bugs Bunny
:Bugs_Bunny a :Looney_Tunes_Character ;
:name "Bugs Bunny" ;
:species "Hare" ;
:gender "Male" ;
:made_debut_appearance_in :A_Wild_Hare ;
@jroneil
jroneil / queries.sparql
Last active August 4, 2021 16:26
queries.sparql
PREFIX : <http://looneytunes-graph.com/>
CONSTRUCT {
?c :debuted_in ?d
}
WHERE {
?c a :Looney_Tunes_Character ;
:made_debut_appearance_in ?m .
?m :release_date ?d
}
@jroneil
jroneil / gist:d1cf55823938b24ebe83982a585bf3a0
Last active February 27, 2020 13:55 — forked from kyledrake/gist:d7457a46a03d7408da31
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
# Procedure is for Ubuntu 14.04 LTS.
# Using these guides:
# http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
# https://www.onlinesmartketer.com/2009/06/23/curl-adding-installing-trusting-new-self-signed-certificate/
# https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/
# Generate the root (GIVE IT A PASSWORD IF YOU'RE NOT AUTOMATING SIGNING!):
openssl genrsa -aes256 -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
@jroneil
jroneil / kafkanotes.txt
Last active December 31, 2019 18:43
Kafka notes
Start Zookeeper server
zookeeper-server-start.sh config/zookeeper.properties // need to be in parent directory
<kafka dir>/bin/zookeeper-server-start.sh config/zkeeper.properties
Startr Kafka
kafka-server-start.sh config/server.properties //need to be in parent directory
<kafka dir>/bin/kafka-server-start.sh config/server.properties
Create a topic
@jroneil
jroneil / Postgresql functions
Last active December 5, 2019 14:42
Postgresql functions
#Return void
CREATE OR REPLACE FUNCTION fix_homepage() RETURNS void AS $$
UPDATE suppliers
SET homepage='N/A'
WHERE homepage IS NULL;
$$ LANGUAGE SQL;
#Execute
SELECT fixx_homepage();
#Return Single value
@jroneil
jroneil / firewalld
Created November 26, 2019 13:05
Firewalld
firewalld
sudo systemctl status firewalld
.sudo systemctl start firewalld
firewall-cmd --list-ports
firewall-cmd --permanent --add-port=100/tcp
firewall-cmd --reload
@jroneil
jroneil / Key store notes
Created November 26, 2019 13:04
Keystore notes
create a Keystore
ssh-keygen -t rsa -f ./bknifi_user //creates public and private key
Make public key
ssh-keygen -y -f key.pem > key.pub
@jroneil
jroneil / SELinux
Last active November 26, 2019 13:03
SELinux
Create a policy
Reference https://relativkreativ.at/articles/how-to-compile-a-selinux-policy-package
Create Type enforcement file (text)
cat /var/log/audit/audit.log | audit2allow -m myapp > myapp.te
Create modfie(binary)
checkmodule -M -m -o myapp.mod myapp.te
create the Policy module
semodule_package -o myapp.pp -m myapp.mod
load Policy Module
semodule -i myapp.pp
@jroneil
jroneil / Docker Compose
Created October 23, 2019 01:02
Docker compose commands
docker-compose up //starts images
docker-compose down //stops images