Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,130
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Magictallguy

  1. Instructions are available at https://getcomposer.org/
  2. You'll probably need to your files over to the Docker with COPY
  3. Oop, my mistake, forgot to include the watch directive. Assuming the docker-compose.yml you posted earlier is up to date services: # PHP service (for Laravel) php: build: context: . dockerfile: Dockerfile container_name: php volumes: - .:/var/www/ networks: - portfolio_network working_dir: /var/www/ # Nginx service nginx: image: nginx:latest container_name: nginx volumes: - ./:/var/www - ./nginx/:/etc/nginx/conf.d/ ports: - "80:80" depends_on: - php networks: - portfolio_network develop: watch: - action: sync path: . target: /var/www # MySQL service mysql: image: mysql:5.7 container_name: mysql environment: MYSQL_ROOT_PASSWORD: MySQLPass MYSQL_DATABASE: portfolio_db MYSQL_USER: portfolio_user MYSQL_PASSWORD: portfolio_password volumes: - mysql_data:/var/lib/mysql networks: - portfolio_network volumes: mysql_data: networks: portfolio_network: driver: bridge Addition started line 27
  4. docker compose watch Ctrl + C Does it build?
  5. OS: Linux (Ubuntu) Editors: Depends on what the active project's requirements are. Most likely, JetBrains PhpStorm, JetBrains WebStorm, or VSCode for the smaller things. Database: The SQL extension bundled with JetBrains. Deployment: Docker for local dev deployment and personal testing, CI/CD via GitLab (pref.)/GitHub which includes a number of sanity checks before actually deploying to live. On PHP's side of things, I'll swear by Composer. For Node, it is (of course) npm For things that are usually single-purpose (an "I need a thing for this, and only this" thing), I'll either search Google for something close enough or just write the utility myself. It's rare that I have to (S)FTP into a site. When I do, I'll quickly hop in with the bundled SFTP extension in JetBrains, or the SFTP extension by Natizyskunk for VSCode. A decent editor is a good place to start, but there are times when you may find that your feature-rich editor doesn't have a feature you want/need. For example, the String Manipulation extension (for IntelliJ (the JetBrains people)) is a nifty tool for quick-swapping ", ', and `, lowercase, Sentence case, UPPERCASE, Title Case, snake_case and CamelCase, and a couple of other little helper utilities; complete with hotkey support! I use EnvVars throughout my projects (love me some .env), so I like the .env files support extension which does exactly what you think it does: provides "native" support for .env files. An honourable mention for the Prisma ORM extension which I'm using for one of my other projects (yup, cheeky plug time - that project is KumaBot Defender, an anti-bot for use on Twitch), which adds full support for the Prisma syntax.
  6. A little MCC history - dabomstew was a Torn City player and wanted his own version, so he and ColdBlooded wrote MCC. Torn City came first and inspired MCC
  7. I said PowerShell, not CMD 😉
  8. Answering the question Assuming you're on Windows here. XAMPP uses local files on your PC, so you'd be changing permissions of files and folders on your local system - which gives you 2 options. Personally, I prefer the shell method. Run PowerShell, change directory to the one above the one you're attempting to alter (example; if you were trying to change the permissions of C:\xampp\htdocs\some-folder, you'd cd to C:\xampp\htdocs) Then run the chmod command chmod 0777 some-folder replacing "some-folder" with, in your case, "public_html" - The other method is to use Windows file/folder properties, altering the permissions in [directory] -> Properties -> Security -> Permissions Why we don't do this Granting read/write/execute to the entire webroot is a massive security hole. Upload and execute anything, brilliant! Goodbye, hard work. Consider moving whatever needs to write to the webroot into a subfolder and simply making that 0766 instead (owner can read/write/execute, anyone else can r/w), or even the standard 0755 (owner r/w/x, everyone else r/x but not write)
  9. Love a Digital Ocean droplet, and Vultr's pretty good too. Had no issues with either provider
  10. Magictallguy

    Ngmafia

    That hasn't legally been my name for over 4 years. 😉
  11. Magictallguy

    Ngmafia

    gRPG v2 is open-source and still actively maintained 🙂
  12. We have a "Flag as spammer" feature that allows us to - you guessed it - flag the user as a spammer. The forum software's automation takes over according to a few rules set up in the back end that removes the posts and bans the account in question.
  13. We've been fighting it during the temporary antispam downtime. Don't worry, they won't win 😉
  14. Busy, busy! KumaBot Defender (an anti-bot, anti-threat solution for use on Twitch) is demanding a fair chunk of my time. I've also been working with clients on their projects, ranging from text-based games to eCommerce and CMS work. TL;DR: Still here, just busy.
  15. Error reporting! When in doubt, go straight for the logs. Glad you found it 🙂
  16. If you're already using Docker, why not Dockerize your project? If you're not using containers, why not?! Once over the initial hurdle of "whaddafuqisthisballs?!", Docker/Podman/Portainer can be span up in 1 command. There are a few forks of the now open-source MCCv2 which include variations of configs to run in containers. On a personal note, since writing a drop-in Docker config (copy files -> paste files, done), I haven't touched LAMP/XAMPP/WAMP (couldn't anyway, I'm on Linux) and don't bloody want to!
  17. Agreed! However, the question of "how far away from original MCC do we want to take this?" was raised. I otherwise swear by dependency injection
  18. There's still quite a large following for this style of game. It would stand to evidence that people still consider it fun. Also, these games are making a resurgence, so they must be wanted.
  19. You'd be surprised what motivation does for one's desire to code. In one day, I refactored MCCv2 in its entirety to use ParagonIE's EasyDB - last night. Here's the branch 😉 Edit: And here's a Dockerized version
  20. If nobody beats me to it, consider it done. I'm not as experienced with Eloquent as I'd like to be, so I'll be avoiding implementation. If the concept gains traction, I'll bite the bullet and blow off the dust, as it were. That being said, replacing an ORM with another on a project this arguably small would be a small feat. As for PDO (which @ags_cs4 mentioned), I quite like ParagonIE's EasyDB. Its performance - while I can't provide statistics right now - has been exactly what I'm looking for; easy to use, fast, (relatively) light on resources. .. which, thinking about it, also opens another question - do we want to rely on package managers (npm, composer, etc.) or ship it all in-house?
  21. While that isn't my choice, I admit I'm curious! Semi-related; So, what about .. transactions? 2 method additions to the database class and we've got easy-enough transactions. I'm aware that MyISAM is a non-transactional storage engine, whereas InnoDB would support them fine (not to worry, MyISAM will just ignore the commit/rollback and run as "normal"). /** * @param string $name * @param array $arguments * @return void */ public function __call(string $name, array $arguments) { call_user_func_array([$this->connection_id, $name], $arguments); } /** * @param Closure $func * @return void */ public function try_transaction(Closure $func): void { try { $this->begin_transaction(); $func(); $this->commit(); } catch (mysqli_sql_exception $e) { $this->rollBack(); throw $e; } } Then, for usage, and using the new staff roles as example; /* BEFORE */ $this->db->query( 'DELETE FROM users_roles WHERE staff_role = ' . $role_id, ); $this->db->query( 'DELETE FROM staff_roles WHERE id = ' . $role_id, ); stafflog_add(ucfirst($log)); /* AFTER (where $role_id is the role's ID and $log is a string) */ $save = function () use ($role_id, $log) { $this->db->query( 'DELETE FROM users_roles WHERE staff_role = ' . $role_id, ); $this->db->query( 'DELETE FROM staff_roles WHERE id = ' . $role_id, ); stafflog_add(ucfirst($log)); }; $this->db->try_transaction($save); Do we want?
  22. Oh, sick! Gimme a moment to update the cronless crons to use the new staff roles and I'll fire PRs 🙂 Branches merged, PR sent
  23. So yeah, about having a place to send all these. The open-sourcing has renewed the soft spot for MCC
  24. So, thought I'd start the ball rolling on releasing up-to-date mods for MCCv2-PHP8-Community (or whatever Dave's calling it) - here's a staff roles overhaul, loosely based on Discord's Roles, and on a feature branch. Want it? (I may or may not be hinting at the possibility of an MVC-ish release too) For anyone else here, feel free to use/upgrade these concepts 🙂 Edit: Just finished overhauling the crons. Now with optional "use timestamps instead" alternative to crons, the ability to force-run a cron, and status logging
  25. This was fun. More, please! 😄 Ooh! Here's a potentially-horrifying idea. Lets go through and update all MCCv2 mods to be PHP8-compliant and release them under one mass repo (with author's permission if not considered abandonware, of course) >:D Ooooh! Can we do a module installer? plzplzplz
×
×
  • Create New...