Skip to content

Instantly share code, notes, and snippets.

View exileed's full-sized avatar
🎵
NP: North Star of Nija (Orbit Culture) (3:25/5:14)

Dmitriy Kuts exileed

🎵
NP: North Star of Nija (Orbit Culture) (3:25/5:14)
View GitHub Profile
@exileed
exileed / .gitlab-ci.deployments.yml
Created September 6, 2018 12:38
.gitlab-ci laravel
image: lorisleiva/laravel-docker:latest
before_script:
- mkdir -p ~/.ssh
- echo "$PACKAGE_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- mysql -h $DB_HOST -u root -p$MYSQL_ROOT_PASSWORD -e "SHOW DATABASES;"
@exileed
exileed / index.html
Last active August 29, 2018 13:25 — forked from webstoun/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>uniMail</title>
</head>
<body>
<form action="mail.php" method="POST">
<?php
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = '****@gmail.com';
$password = 'PASSword';
echo "<script>console.log( 'Debug Objects: " . $username . "' ); </script>";
/* try to connect */
$items = array(
@exileed
exileed / Can.php
Last active May 14, 2018 15:01 — forked from myvitaliy/index.php
index.php
<?php
namespace twelve;
require_once 'CanMove.php';
class Car
{
use CanMove;
<?php
$sitemap = "sitemap.xml";
$startUrl = "http://php.net";
$extencions = [
".html",
".php",
"/",
];
$scanned = [];
@exileed
exileed / bitbucket-pipelines.yml
Created April 6, 2018 17:21
Bitbucket pipelines test + Ansible deploy script
image: php:7.1-fpm
pipelines:
default:
- step:
caches:
- composer
script:
# Update dependencies
- apt-get update
# Install dependencies
@exileed
exileed / pre-commit
Created April 3, 2018 14:11
php-cs-fixer pre commit hook
#!/usr/bin/env bash
echo "php-cs-fixer pre commit hook start"
PHP_CS_FIXER="bin/php-cs-fixer"
PHP_CS_CONFIG=".php_cs"
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.php')
if [ -n "$CHANGED_FILES" ]; then
$PHP_CS_FIXER fix --config "$PHP_CS_CONFIG" $CHANGED_FILES;
git add $CHANGED_FILES;
@exileed
exileed / deploy.yml
Created April 3, 2018 14:02
Ansible - Laravel 5.4+ deploy script
- hosts: all
vars:
branch: "master"
app_root: /www
app_repo: "[email protected]"
tasks:
- name: Enable maintenance mode
shell: php artisan down
args:
"""
Application router decoretor.
"""
from functools import wraps
ROUTES = dict()
def bluprint_add_routes(blueprint, routes):
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at