Skip to content

Instantly share code, notes, and snippets.

View johnkingzy's full-sized avatar
🎯
Focusing

Kingsley Solomon johnkingzy

🎯
Focusing
View GitHub Profile
@johnkingzy
johnkingzy / competitions.json
Last active February 17, 2023 00:08
competitions.json
[
{
"name": "UEFA Europa League",
"affiliation": "UEFA"
},
{
"name": "UEFA Europa Conference League",
"affiliation": "UEFA"
},
{
@johnkingzy
johnkingzy / Podfile
Created November 6, 2022 05:35
My Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
target 'proofOfConcept' do
config = use_native_modules!
# Flags change depending on the env values.
import multer from 'multer';
import firebaseAdmin from 'firebase-admin';
import { default as serviceAccount } from '../../config/newapp-6a21b-firebase-adminsdk-l4qfa-aea1ab47b1.json';
export const config = {
api: {
bodyParser: false,
},
}
@johnkingzy
johnkingzy / CURL-cheatsheet.md
Created September 24, 2021 20:25 — forked from joshuapekera/CURL-cheatsheet.md
CURL Cheatsheet
  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
  • JSON PUT
@johnkingzy
johnkingzy / curl
Created July 2, 2021 23:54
CURL Example
curl --location --request POST 'https://api.redoxengine.com/endpoint' \
--header 'Authorization: Bearer 8c6f0a91-01a0-4240-bb90-412e285adcdc' \
--header 'Content-Type: application/json' \
--data-raw '{
"Meta": {
"DataModel": "Results",
"EventType": "New",
"EventDateTime": "2021-06-29T21:13:48.430Z",
"Test": true,
"Source": {
@johnkingzy
johnkingzy / index.tsx
Created June 23, 2021 20:26
index.tsx
import Head from "next/head";
import { Component, useEffect } from "react";
import { io } from "socket.io-client";
class Home extends Component {
public socket: any;
constructor(props: any) {
super(props);
}
const mockInitializeApp = jest.fn();
const mockCert = jest.fn();
const defaultOptions = {
includeIdsInData: false,
mutable: false,
};
class FakeAuth {
constructor() {
@johnkingzy
johnkingzy / manual-gzip-howto-and-test.html
Created December 16, 2020 15:51 — forked from osvik/manual-gzip-howto-and-test.html
How to manually gzip CSS and JS files and serve them with Apache
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Manually gzip CSS and JS files</title>
<link rel="stylesheet" href="bootstrap-custom.min.css" type="text/css">
<script src="header-scripts.min.js"></script>
</head>
# install from nodesource using apt-get
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
curl -sL https://deb.nodesource.com/setup | sudo bash - && \
apt-get install -yq nodejs build-essential
# fix npm - not the latest version installed by apt-get
npm install -g npm
@johnkingzy
johnkingzy / firebase-snippet.js
Created October 18, 2020 04:50
Firebase/Firestore useful snippets
// delete all users from the auth console
module.exports.deleteUsers = async (req, res) => {
return admin
.auth()
.listUsers()
.then((result) => {
const markedForDelete = [];
result.users.forEach((user) => {
markedForDelete.push(user.uid);