Skip to content

Instantly share code, notes, and snippets.

View pc-magas's full-sized avatar
🇬🇷
Souvlaki daisuki!!!!!

pc_magas pc-magas

🇬🇷
Souvlaki daisuki!!!!!
View GitHub Profile
@pc-magas
pc-magas / gist:081de6cf234e3489e47a11913c506438
Created September 29, 2023 21:40
Setup php at ant php version >= 5.3
<?php
/**
*
* Xdebug setup Script - php version
* Copyright (C) 2023 Dimitrios Desyllas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@pc-magas
pc-magas / setup_xdebug.sh
Created September 29, 2023 21:37
Setup Xdebug
#!/usr/bin/env bash
#
# Xdebug setup Script
# Copyright (C) 2023 Dimitrios Desyllas
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@pc-magas
pc-magas / Buidling.md
Created July 15, 2022 09:51
Winsock Example

Build in Linux

STEP1: Install Mingw32

sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine64
sudo apt-get install g++-mingw-w64-i686 g++-mingw-w64-i686

STEP2: Compile

@pc-magas
pc-magas / output.txt
Created November 4, 2021 11:36
Finaly Example
FinallyPHP Fatal error: Uncaught Exception: dsadsadas in /var/www/html/api/test.php:4
Stack trace:
#0 {main}
thrown in /var/www/html/api/test.php on line 4
Fatal error: Uncaught Exception: dsadsadas in /var/www/html/api/test.php on line 4
Exception: dsadsadas in /var/www/html/api/test.php on line 4
Call Stack:
@pc-magas
pc-magas / Html
Created September 17, 2021 11:32
Inline UL with billets except first element
<ul class="list-inline">
<li>
Grece
</li>
<li>
Balkans
</li>
<li>
Fish & Chips
</li>
#!/usr/bin/env php
<?php
// Input CSV
$csv_file="contacts (3).csv";
// Output file
$ldap="contacts.ldif";
/**
const mandrill = require('node-mandrill')('ThisIsMyDummyApiKey');
const sendEmail = async () => {
return await mandrill('/messages/send', {
message: {
to: [{email: '[email protected]', name: 'Jim Rubenstein'}],
from_email: '[email protected]',
subject: "Hey, what's up?",
text: "Hello, I sent this message using mandrill."
@pc-magas
pc-magas / TestTemp.php
Created July 16, 2019 11:55
A simple code Snipper to check the functionality of `assertEmpty`
<?php
namespace Tests\Unit;
use PHPUnit\Framework\TestCase;
class TestTemp extends TestCase
{
public function testAssertEmpty()
{
@pc-magas
pc-magas / Dockerfile
Created June 18, 2019 08:29
Dockerfile form php developent and CI
ARG BASE_IMAGE=php:7.2-fpm-alpine
FROM ${BASE_IMAGE}
ARG USERID=1000
ARG GROUPID=1000
ENV DOCKER_UID=${USERID} \
DOCKER_GID=${GROUPID} \
PHP_CONF_DIR="/usr/local/etc/php/conf.d" \
FPM_CONF_DIR="/usr/local/etc/php-fpm.d" \
@pc-magas
pc-magas / sha256verify.sh
Created May 16, 2018 12:58
SHA256verify hash from a provided hash and file script
#!/bin/bash
#
# Copyright 2018 DESYLLAS DIMITRIOS
#
# 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:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,