Skip to content

Instantly share code, notes, and snippets.

import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
@ankurk91
ankurk91 / install_lamp_ubuntu.sh
Last active December 23, 2024 19:02
Ubuntu 22/24 - PHP development (php 7.4 / 8.4, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
@ezhevita
ezhevita / Ryujinx Games List Compatibility.csv
Last active December 23, 2024 19:02
Reconstructed Ryujinx games list compatibility database
issue_number issue_title extracted_game_id issue_labels extracted_status last_event_date events_count
42 ARMS - 01009B500007C000 01009B500007C000 status-playable;ldn-works;LAN playable 2024-08-28 7:49:24 9
43 Pokemon Quest - 01005D100807A000 01005D100807A000 status-playable playable 2022-02-22 16:12:32 10
44 Retro City Rampage DX status-playable playable 2021-01-05 17:04:17 8
45 Kirby Star Allies - 01007E3006DDA000 01007E3006DDA000 status-playable;nvdec playable 2023-11-15 17:06:19 23
46 Bayonetta 2 - 01007960049A0000 01007960049A0000 status-playable;nvdec;ldn-works;LAN playable 2022-11-26 3:46:09 10
47 Bloons TD 5 - 0100B8400A1C6000 0100B8400A1C6000 Needs Update;audio;gpu;services;status-boots boots 2021-04-18 23:02:46 5
48 Urban Trial Playground - 01001B10068EC000 01001B10068EC000 UE4;nvdec;online;status-playable playable 2021-03-25 20:56:51 8
49 Ben 10 - 01006E1004404000 01006E1004404000 nvdec;status-playable playable 2021-02-26 14:08:35 8
50 Lanota status-playable playable 2019-09-04 1:58:14 5
@julionc
julionc / 00.howto_install_phantomjs.md
Last active December 23, 2024 19:02
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@vedantroy
vedantroy / demo.ts
Last active December 23, 2024 19:01
SQLite-backed key-value store with JS-like object manipulation and automatic JSON serialization.
import Database from 'better-sqlite3';
import { createDatabaseClient } from './proxy.ts';
// 1) Create an in-memory DB and your table(s).
const db = new Database(':memory:');
db.exec(`
CREATE TABLE users (
id TEXT PRIMARY KEY,
data JSON
);
@L422Y
L422Y / Mass cancel Amazon Subscribe and Save.md
Last active December 23, 2024 18:58
Mass cancel Amazon Subscribe and Save
  1. Open your subscriptions page:
https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_=mys_nav_op_D
  1. Paste into devtools console
  2. Wait a few moments, and then refresh/repeat for any additional pages
  3. Confirm by checking to see if you've received cancellation emails
@azabcodes
azabcodes / adaptive_form_factor.dart
Created December 21, 2024 19:59
adaptive_form_factor.dart
import 'package:flutter/material.dart';
extension AdaptiveCount on BuildContext {
T withFormFactor<T>({
required T onMobile,
required T onTablet,
required T onDesktop,
bool followDeviceOrientation = true,
}) {
final formFactor = this.formFactor(
@mattiasghodsian
mattiasghodsian / readme.md
Last active December 23, 2024 18:53
How to create a Windows application Installer with NSIS

Nullsoft Scriptable Install System is also known as NSIS open-source system to create Windows application installers. NSIS is a script-based system allowing you to create the logic behind your installer/setup file in a complex way to install tasks. NSIS offers plug-ins and other scripts, for example, to download/install 3rd-party files or communicate with Windows.

The tutorial application

This tutorial will guide you through installing and creating your first Windows installer with Nullsoft Scriptable Install System and how to compile your project. Captura Portable will be used as "our application" for the sake of this tutorial.

Installation

Head to NSIS official site and download the latest release and install it. Run NSIS and you will be welcomed with a menu like below, It's always a good practice to read the Documentation before jumping in t

@shauan1508
shauan1508 / Microscope Camera File Renamer.py
Created December 23, 2024 18:44
Microscope Camera File Renamer
import os
import shutil
from itertools import cycle
def create_folders(base_path, work_order, serial_numbers):
work_order_path = os.path.join(base_path, work_order)
if not os.path.exists(work_order_path):
os.makedirs(work_order_path)
for serial_number in serial_numbers:

A metatable can be defined like

local t = setmetatable({}, {
  __tostring = function() return 'custom tostring behavior!' end
})

Here are the metamethods that you can define, and their behavior

Operators