Skip to content

Instantly share code, notes, and snippets.

@bmaupin
bmaupin / free-backend-hosting.md
Last active April 28, 2024 08:49
Free backend hosting
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 08:45
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 28, 2024 08:45
A badass list of frontend development resources I collected over time.
@Morley93
Morley93 / openvpn.md
Last active April 28, 2024 08:44
This is how you can take an openvpn .ovpn config file and extract the certificates/key required to import the profile into NetworkManager.

OpenVPN .ovpn manipulation.

This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.

  • Download the .ovpn file. Save it somewhere you can store it permanently (I use ~/.vpn).
  • Copy from between <ca> tags into ca.crt, remove <ca> tags.
  • Copy from between <cert> tags into client.crt, remove <cert> tags.
  • Copy from between <key> tags into client.key, remove <key> tags.
  • Copy from between <tls-auth> tags into ta.key, remove <tls-auth> tags.
  • Remove the line "key-direction 1"
  • Above "# -----BEGIN RSA SIGNATURE-----" insert the following lines.
@noraj
noraj / gulp-cjs-to-esm.md
Last active April 28, 2024 08:42
Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Context

del v7.0.0 moved to pure ESM (no dual support), which forced me to move my gulpfile to ESM to be able to continue to use del.

The author sindresorhus maintains a lot of npm packages and does not want to provides an upgrade guide for each package so he provided a generic guide. But this guide is a bit vague because it's generic and not helping for gulp, hence this guide.

Guide

@pmduque
pmduque / Export view to drawio.ajs
Last active April 28, 2024 08:40
Export an Archimate view to be imported into draw.io #jarchi #drawio
/*
* Author: Pedro Duque
* Version: 0.2
* Date: 2022-12-19
*
* PURPOSE:
* This script exports an Archimate view to imported into draw.io (aka diagrams.net).
*
* USAGE:
* - Select a view in Archi
@Himura2la
Himura2la / .gitlab-ci.yml
Last active April 28, 2024 08:36
MkDocs with plugins in GitLab CI (with apk and pip packages caching)
image: python:alpine
variables:
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
APK_CACHE_DIR: $CI_PROJECT_DIR/.cache/apk
PIP_PACKAGES:
mkdocs
mkdocs-material
mkdocs-git-revision-date-localized-plugin
cache:
paths:
@djfdyuruiry
djfdyuruiry / README.md
Last active April 28, 2024 08:34
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

# set your OPENAI_API_KEY in your .env
from openai.types.chat import ChatCompletionMessageParam
from mirascope.openai import OpenAICall
from dotenv import load_dotenv
load_dotenv()
class Librarian(OpenAICall):
prompt_template = """
SYSTEM: You are the world's greatest librarian.
MESSAGES: {history}