This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
- Caddyfile
- config.json
- docker-compose.yml
Client side contents:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# 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" |
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder