Skip to content

Instantly share code, notes, and snippets.

View gotexis's full-sized avatar
🤪
Establishing the new world order

Exis gotexis

🤪
Establishing the new world order
View GitHub Profile
@gotexis
gotexis / childAndParent.jsx
Last active February 14, 2023 22:42
Display a modal, from child react app inside iframe, to parent react app
// Child component
// =======================================================================
import React, { useState } from 'react';
function componentToJson(component) {
let jsonTree = {};
if (typeof component === 'string') {
return { type: 'text', value: component };
} else {
jsonTree.type = component.type;
@nokidding
nokidding / updateNpm.bat
Created March 31, 2020 13:08
Windows batch file which updates npm for nvm-windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Asbra
Asbra / lcu-mm-auto-accept-auto-lock-champion.py
Last active September 18, 2023 12:41
League of Legends auto-accept matchmaking, auto-pick champion, insta-lock champion, via LCU API (any region)
###############################################################################
# League of Legends (LCU API) script
#
# Auto accept matchmaking
# Automatic/instant pick champion
# Automatic/instant lock champion
# Set High process priority
#
# Usage:
# python lcu-mm-auto-accept-auto-lock-champion.py "Jax" "Xayah"
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 23, 2024 16:23
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

// Gist for https://medium.com/@ebakhtarov/bidirectional-websockets-with-redux-saga
import { eventChannel } from "redux-saga";
import { all, call, put, take, select, race } from "redux-saga/effects";
import { actionTypes } from "./constants";
function watchMessages(socket) {
return eventChannel(emit => {
/* eslint-disable no-param-reassign */
@mjtamlyn
mjtamlyn / cursor.py
Last active December 2, 2021 08:42
Graphene pagination
import functools
from django.db.models import Prefetch, QuerySet
import attr
import graphene
from cursor_pagination import CursorPaginator
from graphene.utils.str_converters import to_snake_case
from graphql_relay import connection_from_list
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 17, 2024 07:59
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096