Skip to content

Instantly share code, notes, and snippets.

View eplt's full-sized avatar

Edward Tsang eplt

View GitHub Profile
@yward
yward / cloudpanel-alias.md
Last active February 12, 2025 10:00
CloudPanel domain alias with separate SSL certificate and shared www dir (Useful for WordPress multisite domain mapping)

While CloudPanel is a great panel, it lacked the ability to add domain aliases or parked domains without manually modifying nginx config files.
Even if you modify the vhost server_name with addon domain, it still shares any SSL certificate with the main domain, which is not optimum for our use case, so below is our solution to have the domain be completely independent (Own SSL, own Vhost file) but share the directory of your main domain as an alias while still using the web interface (mostly) to manage the new alias: \

What is required?
-Main site (let's assume main site document path is /home/mainsite/htdocs/mainsite.com and the username and group are "mainuser")
-Secondary site (we're going to create it following the steps in this Gist) \

Steps:
1-Create a new site (Use any template other than reverse proxy, we recommend PHP).
2-Generate the SSL using let's encrypt for your new site like you'd normal do for any website. \

@bluelovers
bluelovers / ChatGPT Stable Diffusion prompts generator.txt
Last active December 13, 2024 01:32
using ChatGPT as Stable Diffusion prompts generator
Stable Diffusion is an AI art generation model similar to DALLE-2.
Here are some prompts for generating art with Stable Diffusion.
Example:
- A ghostly apparition drifting through a haunted mansion's grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting.
- portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth
- pirate, deep focus, fantasy, matte, sharp focus
- red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful
- a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait
@qiuyuzhou
qiuyuzhou / update_potatso_rules.py
Last active December 30, 2018 15:22
Download latest gfwlist.txt then convert it to potatso rules config file. Python3
# -*- coding: utf-8
__author__ = 'Charlie Qiu <[email protected]>'
import logging
import urllib.parse
import base64
import os
import requests
import yaml
from django.conf import settings
@ralph089
ralph089 / .wakeup
Last active February 17, 2024 09:56
Restarts Bluetooth Module on Mac OS X. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See README.md). I created it, because my Logitech Bluetooth Mouse doesn't stay connected after sleep-mode, so i had to manually re-pair my mouse.
#!/bin/bash
#
# Restart Bluetooth Module on Mac OS X
#
# Requires Blueutil to be installed: http://brewformulas.org/blueutil
BT="/usr/local/bin/blueutil"
log() {
echo "$@"
@dotcomputercraft
dotcomputercraft / gist:b7283bd52f4b5389e748
Last active June 29, 2024 18:52
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@dillondcarter
dillondcarter / How To Outsource Your Business And Life
Created April 22, 2014 22:34
How To Outsource Your Life And Business
I started my first company right out of high school. It was nothing fancy but served a small niche which I had plenty of connection too. I was raised in an entrepreneur environment so starting and running a business was nothing new to me but there was one moment I remember, where something in my mindset changed. I noticed I was spending way to much time learning how to do things that did not generate sales or help me. These tasks were repetitive and I am more important things to do as a solopreneur. At this time, I stumbled on a book called The 4 Hour Work Week by Tim Ferriss.
The main thing I learned from this experience was to outsource the stuff you don't know how to do, don't want to do and the things you shouldn't be doing. I know this sounds a bit crazy, I mean, your an entrepreneur. You should be able to figure everything out and be the go to guy right? WRONG! That is exactly what you do NOT want to do.
Outsourcing and working with virtual assistants opened a completely new world to me.I was enligh
@dillondcarter
dillondcarter / The Importance of Mastermind Groups
Created April 9, 2014 01:23
The Importance of Mastermind Groups
Many entrepreneurs feel alone at times and cannot connect with friends or family because they simply do not understand, that is where mastermind groups come into play. Mastermind groups can be your secret weapon when it comes to staying focused and making progress.
A mastermind group is a selection of people who are actively trying to accomplish a similar goal. Once a week or more, this group meets either in person or via video chat to discuss their problems, their wins and to keep each other accountable for the tasks they said they would achieve. At the end of the meetings, each member tells the rest their goals for the next week.
<h3>What Can You Create A Mastermind Group For?</h3>
Mastermind groups have typically been used by entrepreneurs trying to achieve similar goals but this is not the only use for them. So what kind of achievements can you use mastermind groups for?
Starting A New Business
Learning A New Skill
@elmimmo
elmimmo / autoingestion.sh
Last active February 14, 2025 11:20
Script to schedule automated batch-downloading of Apple's App Store and iBookStore sales reports using Apple's AutoIngestion tool
#!/bin/bash
# `autoingestion.sh` downloads Apple iOS App Store sales data. It will
# download it to the same folder the script is running from, and group
# the downloaded files into directories by report type.
#
# It will only attempt to download if new sales data should be
# available.
#
# As skipping already downloaded files depends on the filename pattern