Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
Discover gists
This file contains 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
#!/usr/bin/python | |
# | |
# Copyright 2017 Otto Seiskari | |
# Licensed under the Apache License, Version 2.0. | |
# See http://www.apache.org/licenses/LICENSE-2.0 for the full text. | |
# | |
# This file is based on | |
# https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html | |
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0) | |
# |
This file contains 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
APP_ENV=ci | |
APP_KEY= | |
SESSION_DRIVER=array | |
CACHE_DRIVER=array | |
QUEUE_DRIVER=sync | |
MAIL_DRIVER=log |
This file contains 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
#!/usr/bin/env bash | |
# Install and setup UniFi Controller Software v8.x on Ubuntu 22.04 aka Jammy | |
# | |
# * Download Ubuntu 22.04 - https://releases.ubuntu.com/jammy/ | |
# | |
# * Updating and Installing Self-Hosted UniFi Network Servers (Linux) - https://help.ui.com/hc/en-us/articles/220066768 | |
# * Self-Hosting a UniFi Network Server - https://help.ui.com/hc/en-us/articles/360012282453 | |
# * UniFi - Repairing Database Issues on the UniFi Network Application - https://help.ui.com/hc/en-us/articles/360006634094 | |
# * UISP Installation Guide - https://help.ui.com/hc/en-us/articles/115012196527-UNMS-Installation-Guide |
This file contains 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
package middleware | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"net/http" | |
"net/http/httptest" | |
"os" | |
"strings" |
This file contains 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
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
############ also be sure to RESTART OpenProject after replacing the file. ################ | |
############ it doesn't show that enterprise mode is enabled in the settings, but all ################ | |
############ enterprise mode features, such as KanBan boards, are enabled. ################ | |
#-- copyright | |
# OpenProject is an open source project management software. | |
# Copyright (C) 2012-2024 the OpenProject GmbH | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License version 3. |
This document descrives the process of setting up headscale with swag, using letsencrypt certs.
This assumes you have a subdomain (e.g. wg.example.com) pointing to your SWAG instance and want to use it as a reverse proxy.
Add the subdomain for your desired headscale domain to your .env
file.
For example:
SWAG_EXTRA_DOMAINS=wg.example.com
This file contains 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 torch | |
torch.set_default_device('cuda') | |
from triton.testing import do_bench | |
from collections import defaultdict | |
from functools import partial | |
import random | |
random.seed(0) | |
def get_flops(A, B): | |
ms = do_bench(lambda: torch.mm(A, B)) |
Develop an AI prompt that solves random 12-token instances of the A::B problem (defined here), with 90%+ success rate.
We'll use your prompt as the SYSTEM PROMPT, and a specific instance of problem as the PROMPT, inside XML tags. Example:
This file contains 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
#!/usr/bin/env python3 | |
# Extracts a subset of TLS secrets and injects them in an existing capture file. | |
# | |
# Author: Peter Wu <peter@lekensteyn.nl> | |
import argparse | |
import os | |
import shlex | |
import subprocess | |
import sys |
NewerOlder