Skip to content

Instantly share code, notes, and snippets.

@PavlosMelissinos
PavlosMelissinos / Insult.md
Last active August 26, 2022 10:01
Shakespeare Insult Generator

Shakespeare Insult Generator

Description

Welcome to the shakespearean insult generator (based on Shakespeare insult kit)!

This gist contains 5 files (6 including this)!

  • insult.py -> code
  • w1.txt -> 1st wordset
  • w2.txt -> 2nd wordset
#!/bin/sh
function install_wireguard () {
VER=$(cat /opt/vyatta/etc/version | grep Version | grep -q 'v2.0' && echo '-v2.0' || echo '')
echo "Downloading Wireguard$VER ($BOARD-$RELEASE)..."
FILENAME="wireguard$VER-$BOARD-$RELEASE.deb"
DEB_URL="https://github.com/Lochnair/vyatta-wireguard/releases/download/$RELEASE/$FILENAME"
if (/usr/bin/curl -s -L -o /tmp/$FILENAME $DEB_URL); then
echo "Installing $FILENAME..."
dpkg -i /tmp/$FILENAME
@PavlosMelissinos
PavlosMelissinos / polylith-workspace.edn
Last active April 18, 2021 10:32
A suggestion to add some flexibility to polylith's workspace.edn
;; Current workspace.edn
{:vcs "git"
:top-namespace "polylith.clj.core"
:interface-ns "interface"
:default-profile-name "default"
:compact-views #{}
:release-tag-pattern "v[0-9]*"
:stable-tag-pattern "stable-*"
:projects {"api" {:alias "api", :test []}
@PavlosMelissinos
PavlosMelissinos / ExceptionInfo.py
Last active November 28, 2024 15:48
ExceptionInfo is a custom Python exception inspired by Clojure's ExceptionInfo class
from types import MappingProxyType
class ExceptionInfo(Exception):
def __init__(self,
msg: str = None,
data: dict = None,
cause: Optional[BaseException] = None):
self._message = msg or ""
self._data = data or {}