Skip to content

Instantly share code, notes, and snippets.

@zigforge
zigforge / rdp_setup.sh
Last active September 30, 2024 12:13
rdp_setup.sh (IPv4)
#!/bin/bash
# Usage: sudo ./tailscale_rdp_setup.sh "tailscalekey-auth-key"
set -e
# Error handling
handle_error() {
echo "An error occurred on line $1"
exit 1
}
@zigforge
zigforge / app.py
Created September 21, 2024 06:13 — forked from nicekate/app.py
这是用pixtral streamit应用,记得先在本地添加一个.env的文档,将你的API key放在里面。
import os
import base64
import streamlit as st
from mistralai import Mistral
from PIL import Image
import io
from dotenv import load_dotenv
# 加载 .env 文件
load_dotenv()
@zigforge
zigforge / t14.py
Created September 18, 2024 23:32 — forked from sachnaror/t14.py
Create a zero-downtime deployment script for a Django project with multiple websites (each as a separate app) hosted on an Ubuntu server, passing through GitHub Actions and using MySQL on a separate database server.
# Zero-downtime deployment script for a Django project with multiple websites (each as a separate app)
#hosted on an Ubuntu server, passing through GitHub Actions and using MySQL on a separate database server,
#follow these steps. This process ensures that updates are deployed without downtime.
#!/bin/bash
# Set the directory path
directory="/Users/homesachin/Desktop/zoneone/practice"
@zigforge
zigforge / Bind9-caching.md
Created September 5, 2024 16:17 — forked from mrpeardotnet/Bind9-caching.md
Configure BIND9 as caching nameserver

Install and configure BIND9 as caching DNS nameserver [Debian/Ubuntu]

This tutorial shows how to set-up and configure BIND9 as domain name server (DNS) in caching mode on Debian/Ubuntu based Linux system.

Instalation

sudo apt-get install bind9

BIND configuration

@zigforge
zigforge / dps_sup_nodes.md
Created August 29, 2024 13:13 — forked from VictorTaelin/dps_sup_nodes.md
Accelerating Discrete Program Search with SUP Nodes

Accelerating Discrete Program Search

I am investigating how to use Bend (a parallel language) to accelerate Symbolic AI; in special, Discrete Program Search. Basically, think of it as an alternative to LLMs, GPTs, NNs, that is also capable of generating code, but by entirely different means. This kind of approach was never scaled with mass compute before - it wasn't possible! - but Bend changes this. So, my idea was to do it, and see where it goes.

Now, while I was implementing some candidate algorithms on Bend, I realized that, rather than mass parallelism, I could use an entirely different mechanism to speed things up: SUP Nodes. Basically, it is a feature that Bend inherited from its underlying model ("Interaction Combinators") that, in simple terms, allows us to combine multiple functions into a single superposed one, and apply them all to an argument "at the same time". In short, it allows us to call N functions at a fraction of the expected cost. Or, in simple terms: why parallelize when we can sha

(async () => {
/**
* @param {import('@actions/github/lib/context').Context} context
* @param {import('@actions/core')} core
* @param {InstanceType<import('@actions/github/lib/utils').GitHub>} github
* @param {import('@actions/exec')} exec
* @param {import('@actions/glob')} glob
* @param {import('@actions/io')} io
* @param {NodeRequire} require
*/