Category: Uncategorized

  • PHP how to use values from outside an anonymous function

    In php you can create an anonymous function as a parameter to any other function that requires a function as the input. But you run into a small problem pretty quickly. When you create an anonymous function in PHP it has no access to variables outside of it’s curly braces. So what do you do […]

  • How to update your FosJsRoutingBundle routes file

    When you add a new route to one of your Symfony API routes aka your controllers, you will need to recreate the JSON routing file that FosJsRoutingBundle uses. To do that you use this simple command. php bin/console fos:js-routing:dump –format=json –target=public/js/fos_js_routes.json This command will rewrite your existing routes JSON file located in the public folder […]

  • How to fix Symfony Compile Error: Cannot use Repository as Repository because the name is already in use

    So you got this error? WTF does it even mean? Well my actual error was this. Compile Error: Cannot use App\Repository\PageUrlsRepository as PageUrlsRepository because the name is already in use You can see here what I did is accidentally add a second use statement. I remove that and BOOM all back to normal.

  • How to configure a fake domain name on your localhost on linux aka virtualhosts

    How to configure a fake domain name on your localhost on linux aka virtualhosts

    Often when testing a web project locally you will use something like http://localhost:9000. Unless you are using Docker and dockerizing your app. What if you want to run multiple apps or multiple versions of one app at the same time and instead of going to localhost:9000, localhost:9001 etc. etc. you want to go to https://yourappname […]

  • Why most current social platforms suck

    One major problem with most current social platforms is they randomly ban people for things that are not offensive. You can’t even make a joke on these platforms. They ban people for making jokes like the following. Anyone with an IQ over 75 can clearly see I am making a joke here about how much […]

  • Symfony events resources, links and videos

    To see a list of all events use this command php bin/console debug:event-dispatcher Built-in Symfony Events – this covers some of how events work in Symfony and the basic default events that fire with every request. The HTTP kernel component – This gets to the core of Symfony and it’s event system. The kernel is […]

  • It’s in my head it must be in yours. Why all documentation sucks ass!!!

    Most documentation sucks. It seems most authors have this idiotic idea that whatever is in their head, all their knowledge etc. magically transfers to the user as they read it. These are the same kind of idiots you meet in society that drone on about shit they understand to the totally uninitiated like they are […]

  • Bash how write large amounts of text to a file

    Bash how write large amounts of text to a file

    I searched and tried for days to find the answer to this. All I wanted to do was be able to basically create a file and write text to it exactly as I had entered it in a shell script. Every suggestion on the internet was fubar. Note : to run these commands, put them […]

  • Linux xclip command makes command line life easier

    I discovered a new tool today while adding my ssh keys to Github, something called xclip. The xclip command makes it easy to capture output to the clipboard so you can paste it to another location like into a browser or word file etc. The github docs above have you use it to copy your […]

  • C programming language resources and links

    https://data-flair.training/blogs/c-basic-syntax-rules/ Above is a great link to get started with C programming languge