Skip to content

Instantly share code, notes, and snippets.

View XpycT's full-sized avatar
🏠
Working from home

Oleksandr XpycT

🏠
Working from home
View GitHub Profile
@XpycT
XpycT / code-editor-rules.md
Created December 18, 2024 17:01 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@XpycT
XpycT / install.sh
Created October 3, 2023 19:50
dockerize-app-install.sh
#!/bin/bash
create_docker_file() {
[ -f ./Dockerfile ] && > ./Dockerfile
cat << EOF > ./Dockerfile
FROM php8.2-fpm-alpine
RUN apk update && apk add --no-cache \
git \
curl \
@XpycT
XpycT / business_location.go
Created April 21, 2022 14:21
This is an example to get the business location of a user's Business Profile.
//This is an example to get the business locations of a user's Business Profile.
//
//Prerequisites:
//1. Get your Google Cloud Platform (GCP) project approved.
//Fill out this form:
//https://docs.google.com/forms/d/1XTQc-QEjsE7YrgstyJxbFDnwmhUhBFFvpNJBw3VzuuE/viewform
//Find out more information here:
//https://developers.google.com/my-business/content/prereqs
//2. In that approved project, you need to enable two APIs:
//My Business Business Information API. There isn’t a typo; ‘business’ is repeated twice.
@XpycT
XpycT / copy.go
Created March 31, 2022 12:17 — forked from r0l1/copy.go
Copy a directory tree (preserving permissions) in Go.
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@XpycT
XpycT / mailparse installation
Created June 4, 2021 09:38
How to install mailparse on OpenSuse Leap 15.x
REQUIREMENTS:
- php7-mbstring php7-dev
INSTALL:
1) cd /usr/local/src/
2) wget http://pecl.php.net/get/mailparse-3.1.1.tgz
3) tar -xzvf mailparse-3.1.1.tgz
4) cd mailparse-3.1.1
5) phpize
6) ./configure
@XpycT
XpycT / sphp
Created October 20, 2017 07:09
Switch php version on linux
#!/bin/bash
usage="PHP Version Manager
Usage:
$(basename "$0") -h Show this help text
$(basename "$0") <version> Switch php version
$(basename "$0") list List installed version
"
version=-1