This file contains hidden or 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
    
  
  
    
  | uv: how to run python interactive | |
| https://pydevtools.com/handbook/how-to/how-to-run-a-python-repl-with-uv/ | |
| helix: language.toml | |
| https://docs.helix-editor.com/languages.html | |
| ~/.config/helix/languages.toml | |
| helix: python code autocompletion | |
| https://github.com/helix-editor/helix/wiki/Language-Server-Configurations | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // Worker: Reverse-proxy to origin on a specific port | |
| const ORIGIN_HOST = "yourserver.com"; // replace with your origin hostname (not the public DNS that clients use) | |
| const ORIGIN_PORT = 8080; // replace with the port your origin listens on (e.g., 8080) | |
| const ORIGIN_PROTO = "https"; // "https" or "http" depending on your origin | |
| addEventListener("fetch", event => { | |
| event.respondWith(handle(event.request)); | |
| }); | |
| async function handle(request) { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # This file is maintained as an up-to-date snapshot of the default | |
| # homeserver.yaml configuration generated by Synapse. You can find a | |
| # complete accounting of possible configuration options at | |
| # https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html | |
| # | |
| # It is *not* intended to be copied and used as the basis for a real | |
| # homeserver.yaml. Instead, if you are starting from scratch, please generate | |
| # a fresh config using Synapse by following the instructions in | |
| # https://element-hq.github.io/synapse/latest/setup/installation.html. | |
| # | 
  
    
      This file contains hidden or 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
    
  
  
    
  | --[[ | |
| Neovim configuration file using Packer.lua | |
| This configuration includes support for: | |
| - Git | |
| - Rust language | |
| - JavaScript | |
| - LaTeX | 
  
    
      This file contains hidden or 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
    
  
  
    
  | use axum::{ | |
| extract::{Extension, Json, State}, | |
| http::StatusCode, | |
| middleware::{self, Next}, | |
| response::{IntoResponse, Response}, | |
| routing::{get, post}, | |
| Router, | |
| }; | |
| use jsonwebtoken::{decode, encode, Algorithm, DecodingKey, EncodingKey, Header, Validation}; | |
| use serde::{Deserialize, Serialize}; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| if (class_exists('Memcache')) { | |
| // Create a new Memcache instance | |
| $memcache = new Memcache(); | |
| // Add a Memcache server | |
| $memcache->connect('127.0.0.1', 11211); | |
| // Test storing a value | |
| $key = 'test_key'; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | xclip -selection c < file_name.extension | |
| sometimes the content of the file get too big and it's not easy to select the text you want to copy with mouse. this command | |
| is a handy way to do that. | 
  
    
      This file contains hidden or 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
    
  
  
    
  | from flask import Flask, request, jsonify, make_response, send_from_directory | |
| from werkzeug.utils import secure_filename | |
| import os | |
| import secrets # For secure random filename generation | |
| app = Flask(__name__) | |
| UPLOAD_FOLDER = "uploads" # Change this to your desired upload folder | |
| ALLOWED_EXTENSIONS = set(['mkv', 'txt', 'pdf', 'jpg', 'png']) # Allowed file extensions | 
  
    
      This file contains hidden or 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
    
  
  
    
  | > php -S localhost:8000 | |
| to run php in a directory. | |
| > SELECT user FROM mysql. user; | |
| > or SELECT user,host FROM mysql. user; | |
| in mysql to list users. | |
| Docker: | |
| $ docker system df | |
| to run df (viewing filesystem usage) on docker. | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #include<iostream> | |
| #include<queue> | |
| #include<cassert> | |
| using namespace std; | |
| int main() { | |
| queue<int>myQueue; | |
| int n, k; | |
| int temp; | |
| scanf( "%d %d", &k, &n); | |
| int MAX_K = 1000000000; |