I have some questions about monads, and functors, can you help answer them?
Sure, I'll do my best to help.
What specifically would you like to know about monads and functors?
// ==UserScript== | |
// @name Download ChatGPT Convo in Markdown | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Adds a download chat button to download the current chatGPT conversation in markdown format. Original MD processing code by: u/Creative_Original918 from Reddit. Code from the following thread: https://www.reddit.com/user/Creative_Original918/ https://www.reddit.com/r/ChatGPT/comments/zm237o/comment/jdjwyyo/?utm_source=share&utm_medium=web2x&context=3 | |
// @author https://github.com/node0 and https://www.reddit.com/user/Creative_Original918/ | |
// @match https://chat.openai.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com | |
// @grant none | |
// ==/UserScript== |
class UrlPayloadHandler | |
{ | |
constructor() {} | |
base64Enc( inputUtf8Str ) { return Buffer.from(inputUtf8Str, "utf-8").toString("base64"); } | |
base64Dec( inputB64Str ) { return Buffer.from(inputB64Str, "base64").toString("utf-8"); } | |
encodeUrlPayload( payloadString ) { return encodeURIComponent(this.base64Enc(payloadString)); } | |
decodeUrlPayload( encodedPayloadString ) { return this.base64Dec(decodeURIComponent(encodedPayloadString)); } | |
/* added atob & btoa for cross platform compatibilty (node & browser) as well as documenting their purposes */ | |
btoa = this.base64Enc; | |
atob = this.base64Dec; |
#!/usr/bin/env node | |
const cLog = console.log, | |
Mixin = Object.assign; | |
function makeMixable(ctx, className) { | |
/* Automatically enumerates functions of a class and adds them as properties under this of that class's constructor. | |
* Which makes these methods accessible via the Mixin pattern. | |
*/ | |
Object.getOwnPropertyNames(className.prototype).forEach( (method) => { if (method !== 'constructor') { ctx[method] = ctx[method]; } }) | |
}; |
<?php | |
/** | |
* @package Joomla | |
* @subpackage Membership Pro | |
* @author Tuan Pham Ngoc | |
* @copyright Copyright (C) 2012 - 2021 Ossolution Team | |
* @license GNU/GPL, see LICENSE.php | |
*/ | |
defined('_JEXEC') or die; |
# vim: tabstop=4 shiftwidth=4 fenc=utf-8 spell spelllang=en cc=120 | |
# | |
# FILE: systemctl-shell-accelerator.bash | |
# DESCRIPTION: Convenience method wrappers for Systemd | |
# LICENSE: Apache 2.0 | |
# CREDITS: http://github.com/yaffare/systemd-shell-wrapper http://github.com/mortn/systemd-shell-wrapper | |
# MODIFIED BY: https://gist.github.com/Node0/ef2f12469e27501f6cd67cb5db2ead0d | |
# INSTALLATION: wget -SO/etc/profile.d/systemd-wrapper.sh https://gist.githubusercontent.com/Node0/ef2f12469e27501f6cd67cb5db2ead0d/raw/3109a02eea54c90038df623c0adac2eec2b59228/systemd-wrapper.sh | |
# |
#!/bin/bash | |
grafana-cli plugins uninstall crate-datasource; | |
grafana-cli plugins remove crate-datasource; | |
rm -rf /usr/share/grafana/public/app/plugins/datasource/crate-datasource /usr/share/grafana/data/plugins/crate-datasource /var/lib/grafana/plugins/crate-datasource/; | |
grafana-cli plugins install crate-datasource; | |
mkdir /var/lib/grafana/tempclone; | |
cd /var/lib/grafana/tempclone; | |
git clone https://github.com/raintank/crate-datasource.git; | |
cp -r /var/lib/grafana/tempclone/crate-datasource/dist /var/lib/grafana/plugins/crate-datasource/; | |
cd ..; |
function userList () { | |
# Help string | |
helpText="Usage: basename [-h]|[--help] [--username] [--homedir] [--uid] [--gid] [--ugid] | |
----------------------------------------------------------------; | |
Help: -h or --help, shows this help page. | |
username: --username, fetches a list of usernames which are associated with a current user account. | |
homedir: --homedir, fetches a space delimited list of usernames to home directores. | |
uid: --uid, fetches a space delimited list of usernames to user ids. | |
gid: --gid, fetches a space delimited list of usernames to group ids. | |
ugid: --ugid, fetches a space delimited list of usernames to user ids and group ids. |
#!/usr/bin/env python | |
import os; | |
import sys; | |
def printf(fmt, *varargs): | |
sys.stdout.write(fmt % varargs) | |
domainListFile = "/root/acctWorkFiles/domainList.txt"; | |
userListFile = "/root/acctWorkFiles/userList.txt"; | |
passwordListFile = "/root/acctWorkFiles/passwordList.txt"; |