Skip to content

Instantly share code, notes, and snippets.

View lockness-Ko's full-sized avatar
🕵️‍♂️
skill issue

Lockness lockness-Ko

🕵️‍♂️
skill issue
View GitHub Profile
npm create cloudflare@latest ai-html-generator -- --type=hello-world -y && cd ai-html-generator/ && echo 'export interface Env {AI: Ai;a;}export default {async fetch(request: Request, env: Env): Promise<Response> {const url = new URL(request.url);let prompt = "A simple login page, based off of the microsoft login page style.";if (url.pathname !== "/" && url.pathname.length > 1) {prompt = decodeURIComponent(url.pathname.substring(1));}try {const response = await env.AI.run("@cf/google/gemma-4-26b-a4b-it", {messages: [{role: "system",content: "You are an expert web designer. Output ONLY valid, raw, modern HTML, CSS, and inline JavaScript. Do not wrap code in markdown formatting like ```html. Start exactly with <!DOCTYPE html>."},{role: "user",content: `Generate a beautiful, responsive single-page application for this prompt: "${prompt}"`}],});let htmlContent = "";if (response && typeof response === "object" && "choices" in response && Array.isArray((response as any).choices)) {htmlContent = (response as any).ch
@lockness-Ko
lockness-Ko / c.ps1
Last active December 11, 2023 11:15
powershell 64-bit local process injection without having to bypass amsi. credits to mattifestation for initial implementation.
function t783grubyire79ui34ewui
{
Param(
[Byte[]]$y2wuirg9348wpor239weoui
)
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
#! /usr/bin/env python3
"""
Credit to live overflow for most of the boilerplate. I've just added a command interface, auth and some more stuff
"""
import json
from xmlrpc.client import ProtocolError
import requests
from twisted.python import failure
{
"insecure-registries" : ["nas.pve.universe.ko:5000"],
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}

> QEMU

If you are stuck, ctrl+f in the arch wiki page for qemu or DM me on discord.

> Installation

To install on debian-like systems (e.g. ubuntu, tails etc.) type the following commands to install QEMU:

sudo apt update
sudo apt -y full-upgrade
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
# NOT WORKING!!!
@lockness-Ko
lockness-Ko / vpn.md
Created January 1, 2022 23:56
Create your own vpn (because you can't trust shady VPN providers)

How to create your own VPN service

(because you can't trust shady VPN providers)

Overview

  • Create a VPS (virtual private server)
  • Login to your VPS
  • Clone the wireguard-install github repo and Run the script
  • Copy the client configuration file to your computer
@lockness-Ko
lockness-Ko / install-raspbian-usb-boot.md
Created December 14, 2021 03:53
tutorial on USB booting on raspberry pi 4B with Raspberry Pi OS Bullseye

How to USB boot raspberry pi 4B

A tutorial on USB booting on raspberry pi 4B with Raspberry Pi OS Bullseye

Overview

It's a pretty easy process that involves:

  • Changing the bootloader to look for USB devices to boot from
    • With raspi imager
  • With rpi-eeprom-update