Skip to content

Instantly share code, notes, and snippets.

@multimonos
multimonos / .htaccess_410
Created October 4, 2025 13:36
Apache .htaccess 410 Gone for all requests except index.html or index.php
<IfModule mod_rewrite.c>
# Issue 410 Gone for all requests except /
RewriteEngine On
# Allow root and common index file paths
RewriteCond %{REQUEST_URI} ^/$ [OR]
RewriteCond %{REQUEST_URI} ^/index\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/index\.html$
RewriteRule .* - [L]
@multimonos
multimonos / learn-solidity-resources.md
Last active July 10, 2024 15:37
learning solidity resources
@multimonos
multimonos / browser_rate_limited_iterator.js
Last active March 10, 2022 15:12
rate limited async iterator in javascript
export const RateLimitedIterator = ( rate, values ) => {
console.log( { rate } )
const delay = ms =>
new Promise( resolve => setTimeout( resolve, ms ) )
const iterator = {
[Symbol.iterator]() {
@multimonos
multimonos / valet_share_wordpress_ngrok.php
Last active August 13, 2021 11:43
Valet Share for Wordpress over NGROK
<?php
// add to wp-config.php
$_SERVER['HTTPS'] = 'on';
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_X_ORIGINAL_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_X_ORIGINAL_HOST']);
$_SERVER['HTTP_HOST'] = $_SERVER["HTTP_X_ORIGINAL_HOST"]; // Valet share hack
@multimonos
multimonos / laravel-sail-arm_docker-compose.yml
Created April 14, 2021 13:53
Laravel Sail on M1 - Docker Compose
# For more information: https://laravel.com/docs/sail
version: '3'
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.0/app
@multimonos
multimonos / README.md
Last active March 31, 2020 15:47
Import module from a project folder with python in Houdini

Motivation

This may be a good piece of code to add to your Houdini global python library to allow for easy per project python imports.

Setup

Given your project directory name is `foobar`
  And your python files are saved in `foobar/lib`
  And you want to import code from `foobar/lib/hello.py`
  And you want to execute the function `hello()`
 
@multimonos
multimonos / houdini.env
Last active May 26, 2020 13:39
Houdini Environment Parameter Examples on Mac OS X
# Version: Houdini Apprentice 18.0.287
# Hide the splash page
HOUDINI_NO_SPLASH = 1
#
# External Editor
#
# This setup works in,
# - Attribute Wrangle via "VEX Expression > Expression > Edit in External Editor"
@multimonos
multimonos / wordpress_harden_basic.md
Last active February 6, 2020 15:02
Basic Wordpress Harden

Database

  • pick a random string as wordpress tables prefix
  • rename tables
  • update wp-config.php

.htaccess

# Force SSL
<IfModule mod_rewrite.c>
RewriteEngine on
@multimonos
multimonos / pj-run.sh
Last active March 23, 2019 17:08
processing-java bash script to simplify running on command line
#!/usr/bin/env bash
usage="usage: pj-run /absolute/path/to/sketch/directory"
abspath() {
cd "$1"
echo "$(pwd -P)"
}
assert_is_directory() {
@multimonos
multimonos / sculpt_karabiner_elements_setup_json
Created March 9, 2019 01:32
Karabiner Elements Setup for Microsoft Sculpt Devices on Mac OS
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {