Skip to content

Instantly share code, notes, and snippets.

View XTechnology-TR's full-sized avatar
:shipit:
Focusing

xtechnology XTechnology-TR

:shipit:
Focusing
View GitHub Profile
<?
require('../../../../wp=load.php;
etag_start();
header('Service-Worker-Allowed: /');
?>
_wordpressConfig={templateUrl: <?=get_bloginfo('template_url');?> };
<?
readfile('sw.js');
etag_end();
?>
import openai
openai.api_key = "YOUR API KEY HERE"
model_engine = "text-davinci-003"
chatbot_prompt = """
As an advanced chatbot, your primary goal is to assist users to the best of your ability. This may involve answering questions, providing helpful information, or completing tasks based on user input. In order to effectively assist users, it is important to be detailed and thorough in your responses. Use examples and evidence to support your points and justify your recommendations or solutions.
<conversation_history>
User: <user input>
@Jeremy-Gstein
Jeremy-Gstein / open-ai-api.md
Last active February 25, 2024 02:24
Messing around with OpenAI - API and Whisper

Messing around with OpenAI

Disclaimer: this was just for fun and to learn about openai

I started messing around with openai's API and wanted to share some CLI tools. The following was used to test these scripts. May create a small container or codespace for this in the future.

Enviroment Used:

Fedora Silverblue 37 (VM):

  • 4 x 2 Vcpus (8 cores total)
@Typas
Typas / silverblue_nv_driver.md
Created December 14, 2022 16:04
Fedora Silverblue installation with nvidia drivers

The installation of Silverblue is almost identical with normal Fedora, unless you need some systemwide changes. Unfortunately, the nVIDIA driver is one of these changes. After the installation of Silverblue, I logged in, and the situation is unbearable. The whole screen started blinking, each action caused the screen refresh, and then refresh backward, and then refresh.

My intuition told me that must be nouveau, the driver which never acts normally on my 3060Ti. I followed some steps of the site: https://nudesystems.com/how-to-install-nvidia-drivers-in-fedora-silverblue/

After these steps, I found out there's one mysterious unknown display showed my whole login interface into nowhere. Then I found this site: https://gitlab.gnome.org/GNOME/mutter/-/issues/2266 and modify a little to fit Silverblue:

@Postrediori
Postrediori / Fedora HowTo.md
Last active April 22, 2024 11:07
Fedora Linux Tips&Tricks

Fedora HowTos

Set default grub boot entry in Fedora

The following instructions show howto setup default boot item in grub menu unser Fedora Linux. This may be handful in case of dual-boot setup when the default item must be set to another OS.

Method 1. Specifying boot item by name

This method commands should be launched again after installing new kernel during updates (as it re-launches grub2-mkconfig).

#!/bin/sh
#
echo " .__ __ .__ .__ ";
echo " |__| ____ _______/ |______ | | | | ";
echo " | |/ \ / ___/\ __\__ \ | | | | ";
echo " | | | \\___ \ | | / __ \| |_| |__ ";
echo " |__|___| /____ > |__| (____ /____/____/ ";
echo " \/ \/ \/ ";
echo " ";

2022 Zephyrus G14 Fedora Silverblue Setup

GPU Naming

Most applications in Linux will report the names of the two GPUs as follows.

  • Dimgrey Cavefish is dGPU
  • Yellow Carp is iGPU

Boot Hotkeys

@cornfeedhobo
cornfeedhobo / README.md
Last active May 28, 2024 16:56
Framework Laptop Customizations

Framework Laptop Customizations

This documents the changes made while installing OpenSUSE LEAP 15.3 on the Framework Laptop (1st edition).


Guided install

During the guided install, there are some minor changes that will make things smoother later.

@aydinjavadly
aydinjavadly / wp-config.php
Created October 30, 2021 22:14
WordPress - Default security settings: X-Frame-Options Header in Wordpress. Cookie with HTTPOnly and Secure flag in Wordpress. Secure connection. Cleanup image edits. Disable plugin and theme update and installation. Disable the plugin and theme editor. Disallow unfiltered content. Disallow unfiltered uploads. Disable load scripts for prevent DD…
<?php
/**
* File: wp-config.php
*
* 1. X-Frame-Options Header in Wordpress
* 2. Cookie with HTTPOnly and Secure flag in Wordpress
* 3. Secure connection
* 4. Cleanup image edits
* 5. Disable plugin and theme update and installation
* 6. Disable the plugin and theme editor