Skip to content

Instantly share code, notes, and snippets.

View sssurii's full-sized avatar
😊
:10:10

Surinder Singh sssurii

😊
:10:10
View GitHub Profile
@jdecode
jdecode / youtube-thumbnail-url-from-video-id.md
Last active July 18, 2020 05:29
youtube-thumbnail-url-from-video-id

Stackoverflow answer link - https://stackoverflow.com/a/2068371/867451

Copied the content for quick reference


Each YouTube video has four generated images. They are predictably formatted as follows:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg

https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg

@jdecode
jdecode / controller-request-and-response-objects.md
Last active July 18, 2020 05:32
Laravel to CakePHP conversion

Instead of Illuminate\Http\Request, use Cake\Http\ServerRequest

Find Request $request and replace with ServerRequest $request

@jdecode
jdecode / setup-php-on-ubuntu-19-10.md
Last active July 18, 2020 05:41
Commands to install MySQL, PGSQL, PHP (multiple versions) in Ubuntu 19.10
@jdecode
jdecode / gcp-manual-deploy-php-git-actions-steps.md
Last active July 18, 2020 05:37
Steps to run PHP code with manual code deploy (i.e. via git clone/pull) at Google Cloud Platform [GCP/GCE] : Basics++

High level actions

  1. Create a VM (Virtual Machine) - with minimal hardware specs : probably a version with 1 vCPU and less than (or equal to) 1 GB RAM
  2. Use Ubuntu as the OS (you can choose any other OS, but you have to make sure that the respective commands for any follow up actions are known and you are well versed with those).
  3. Enable/configure SSH to access the system
  4. Clone git repo (Github/Bitbucket/Gitlab etc) - and install any dependencies on the VM
  5. Configure any additional tools/services that the code is using (DB/PDO/JSON etc)
  6. Map the IP/generic-url to a domain name (if you don't have a domain, then make sure you sign-up for that - free or paid - choice is yours) - DNS management

Good to have (If not here, then where? If not now, then when?):