Skip to content

Instantly share code, notes, and snippets.

@i3inary
i3inary / hashmaster5000.py
Created March 17, 2023 21:42
embed image hash in image using stegno
import hashlib
from stegano import lsb
from stegano.lsbset import generators
def generate_hash(image_path):
with open(image_path, 'rb') as f:
img_data = f.read()
hash_object = hashlib.sha256(img_data)
hash_hex = hash_object.hexdigest()
return hash_hex
version: '3'
services:
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
@i3inary
i3inary / notes.sh
Last active May 26, 2022 16:58
Wordpress in Docker on DigitalOcean
#!/bin/bash
# USEFUL LINKS
# https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
# https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04
# https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx
# https://www.digitalocean.com/community/tutorials/how-to-manage-logfiles-with-logrotate-on-ubuntu-16-04
# https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-with-http-2-support-on-ubuntu-18-04
version: "2"
options:
# default: docker-compose.yml if you like, you can set a custom location (path) of your compose file like ~/app/compose.yml
# HINT: you can also use this as an array to define several compose files to include. Order is important!
compose-file-path: 'docker-compose.yml'
# optional, default: docker-compose-dev.yml if you like, you can set a custom location (path) of your compose file. Do not set it, if you do not want to use it at all
# if its there, it gets used, if you name it explicitly, it HAS to exist
# HINT: you can also use this as an array to define several compose files to include. Order is important!
@i3inary
i3inary / osx-10.10-setup.md
Last active September 21, 2015 19:47 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@i3inary
i3inary / wp_install_default.sh
Created April 3, 2012 22:55
Default Install Script for WordPress Setup on MAMP localhost
#!/bin/bash
##############################
# DEFAULT WORDPRESS AND PLUGIN INSTALL SCRIPT
#
# 2012-04-03
# 1.0
# TODO: PUT A YES/NO PROMPT BEFORE RUNNING SCRIPT
#!!!!! EXITS UNLESS YOU MANUALLY COMMENT OUT THE LINE BELOW
exit
@i3inary
i3inary / gist:1904597
Created February 24, 2012 23:33
How to Publish Production WordPress Sites on Development Urls Without Modifying Database
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the