Skip to content

Instantly share code, notes, and snippets.

View andrekutianski's full-sized avatar
🇺🇦
StandWithUkraine

Andre Kutianski andrekutianski

🇺🇦
StandWithUkraine
View GitHub Profile
@andrekutianski
andrekutianski / README.md
Created August 3, 2017 03:37 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@andrekutianski
andrekutianski / iugu_boleto.php
Created August 8, 2017 01:25
Função para o WHMCS Cadastrar o cliente na Iugu com os dados disponíveis no WHMCS
// Cadastra o cliente na Iugu com os dados disponíveis no WHMCS
function iugu_boleto_add_client( $params ){
// busco o campo personalizado referente ao documento do cliente configurado no modulo
$campoDoc = $params['cpf_cnpj_field'];
try{
Iugu::setApiKey($params['api_token']);
$iuguCustomer = Iugu_Customer::create(Array(
"email" => $params['clientdetails']['email'],
@andrekutianski
andrekutianski / iugu_boleto-add-cliente.php
Created August 8, 2017 01:59
busca informações da fatura no banco local para comparação e verificação
// busca o usuario no banco local
$iuguClientId = iugu_boleto_search_client( $userid );
// se não retornar o usuário, presume-se que ele não existe. Então vamos cadastra-lo.
if( !$iuguClientId ){
try {
$iuguClientId = iugu_boleto_add_client( $params );
}catch (\Exception $e) {
echo "Não foi possível cadastrar o cliente na Iugu. {$e->getMessage()}";
@andrekutianski
andrekutianski / git-deployment.md
Created August 25, 2017 12:01 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@andrekutianski
andrekutianski / rclone-cron.sh
Last active March 20, 2019 22:46 — forked from jaredmales/rclone-cron.sh
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Jared Males (jaredmales@gmail.com)
#
# Copyright (C) 2018 Jared Males <jaredmales@gmail.com>
#
# This script is licensed under the terms of the MIT license.
# https://opensource.org/licenses/MIT
#
@andrekutianski
andrekutianski / form.html
Created October 18, 2018 15:27 — forked from escopecz/form.html
An example of how to send a form submission to a Mautic form with jQuery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mautic Form Test</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
@andrekutianski
andrekutianski / .cpanel.yml
Last active November 25, 2018 18:17
cPanel Git file Integration
---
deployment:
tasks:
- export DEPLOYPATH=/home/user/public_html/
- /bin/cp index.html $DEPLOYPATH
- /bin/cp style.css $DEPLOYPATH
mkdir -p ~/projeto/exemplo
cd ~/projeto/exemplo
git init
git config receive.denyCurrentBranch updateInstead
git clone ssh://usuario@dominio:/home/usuariocpanel/projeto/exemplo.git