Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
# Make by x:@BoxMrChen and windsurf ai
import asyncio
import base64
import json
import io
import os
import sys
import pyaudio
@tomdaley92
tomdaley92 / README.md
Last active December 14, 2024 16:51
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@ky-zo
ky-zo / FloatingMenu.tsx
Created April 23, 2024 09:05
FloatingMenu effect from CopyCopter.ai
//Parent of this component is a div with "fixed" className
'use client'
import { motion, useTransform, useScroll, useSpring, useMotionValueEvent } from 'framer-motion'
const ScrollFloatingAnimation = ({ children }: { children: React.ReactNode }) => {
const { scrollYProgress } = useScroll()
const smoothProgress = useSpring(scrollYProgress, {
mass: 0.5,
function Add-Copy {
param (
[Parameter(
Mandatory = $true,
Position = 0,
HelpMessage = "The path of the file to clone."
)]
[ValidateNotNullOrWhiteSpace()]
[string]$OriginalFilePath,
import asyncio
from enum import Enum
HOST = "127.0.0.1"
PORT = 62775
class Commands(Enum):
UPDATE = 0
LOGOUT = 1
@foolofafitz
foolofafitz / hyprscratch.sh
Last active December 14, 2024 16:43
Little rofi script to create and switch between Hyprland special workspaces
#!/bin/sh
# Usage:
# Put this somewhere in your path, make executable and bind a key to...
# rofi -show scratch -modes "scratch:hyprscratch.sh"
# Requires ripgrep
hc=hyprctl
if [ "$1" = "" ]; then
@BoQsc
BoQsc / reloadGnome.md
Last active December 14, 2024 16:42
Reloading Gnome Desktop Environment via command line

dbus-run-session -- gnome-shell --nested --wayland

busctl --user call \ org.gnome.Shell \ /org/gnome/Shell \ org.gnome.Shell.Extensions ReloadExtension \ s "$name"

@niqdev
niqdev / setup-gradle.md
Last active December 14, 2024 16:41
Setup Gradle on Linux

Setup Gradle

Download

mkdir -p ~/opt/packages/gradle && cd $_
wget https://services.gradle.org/distributions/gradle-3.1-all.zip
unzip gradle-3.1-all.zip

Install and setup

@lokimeyburg
lokimeyburg / pm-interview-questions.md
Last active December 14, 2024 16:41
Product Manager Interview Questions

Product Manager Interview Questions

General Questions:

  • Tell me about yourself.
  • Tell me about the most boring job you have ever had.
  • What changes would you make if you came on board?
  • What would you say to your boss if he is crazy about an idea, but you think it stinks?
  • Assuming that you are selected, what will be your strategy for next 60 days?
  • why are not you earning more money at this stage of your career?
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active December 14, 2024 16:39
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'