Skip to content

Instantly share code, notes, and snippets.

@duggan
duggan / setup.py
Created March 29, 2024 12:07
OpenVoice updated setup.py for running on Apple Silicon with Python 3.11
from setuptools import setup
setup(name='MyShell-OpenVoice',
version='0.0.0',
description='Instant voice cloning by MyShell.',
long_description=open('README.md').read().strip(),
long_description_content_type='text/markdown',
keywords=[
'text-to-speech',
'tts',
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active March 29, 2024 13:48
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@rifazn
rifazn / change-theme.sh
Created September 18, 2021 20:37
Hook for gammastep that changes between light and dark variants of theme
#!/bin/sh
# Rifaz Nahiyan
# https://github.com/rifazn
# Hook for gammastep that changes between light and dark variants of theme
# Place this in $XDG_CONFIG_DIR/gammastep/hooks/
# TODO: if prefers-dark-theme is set to true, don't do anything
set_theme () {
@paulirish
paulirish / what-forces-layout.md
Last active March 29, 2024 13:42
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ruevaughn
ruevaughn / 1_top+hacker_methodologies.md
Last active March 29, 2024 13:42
Hacker Methodologies & Tools (NEW)

The Top Hacker Methodologies & Tools Notes

Nuclei Templates

Concrete5 CMS : Identification, Mass Hunting, Nuclei Template Writing & Reporting


Parallelizing the Naughty Dog engine using fibers by Christian Gyrling
http://www.swedishcoding.com/wp-content/uploads/2015/03/parallelizing_the_naughty_dog_engine_using_fibers.pdf
id Tech 5 Challenges
From Texture Virtualization to Massive Parallelization by J.M.P. van Waveren
http://s09.idav.ucdavis.edu/talks/05-JP_id_Tech_5_Challenges.pdf
Doom3 BFG Source Code Review: Multi-threading by Fabien Sanglard
@sujeetkv
sujeetkv / npm-with-private-repo.md
Last active March 29, 2024 13:40
Use private repo as npm dependency.

Use private repo as npm dependency

Create Deploy-Token (Access-Token) for particular private repo and use it in dependency as following:

{
    "dependencies": {
        "package-name": "git+https://<username>:<access_token>@github.com/username/repository#{branch|tag}"
    }
}
@learncodeacademy
learncodeacademy / pubsub.js
Created July 29, 2015 02:54
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }
@patrickmoffitt
patrickmoffitt / wxWidgets3_Hello_World_Ubuntu_18_CMake.md
Created February 13, 2020 23:37
Step-by-step instructions for installing wxWidgets 3.0 and CMake on Ubuntu 18 for the purpose of building and running the Hello World! demo application.

How to Build wxWidgets 3.0 Hello World! on Ubuntu 18 with CMake

Install wxWidgets 3.0

sudo apt-get update
sudo apt-get full upgrade
sudo apt install wx-common wx3.0-doc wx3.0-examples wx3.0-headers wx3.0-i18n \
cmake libwxbase3.0-dev libwxbase3.0-dev libwxgtk-media3.0-dev \
libwxgtk-media3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libwxgtk3.0-dev \
libwxgtk3.0-gtk3-dev libwxsqlite3-3.0-dev libcanberra-gtk-dev \