Skip to content

Instantly share code, notes, and snippets.

View Turaylon's full-sized avatar

Michele Somma Turaylon

View GitHub Profile
@Turaylon
Turaylon / install_pdo_sqlsrv.sh
Last active January 24, 2018 13:50 — forked from joecampo/install_pdo_sqlsrv.sh
Install Official MSSQL driver for Unbuntu 14.04 - pdo_sqlsrv with php 7.1 on Plesk
#!/bin/bash
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo -i export CPPFLAGS="-DSIZEOF_LONG_INT=8"
sudo apt-get -y install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
cd ~
echo "Configuring the unixODBC 2.3.1 Driver Manager"
@Turaylon
Turaylon / .bashrc
Last active August 24, 2017 15:23
My bash aliases
# Laravel
artisan() {
if [ -f bin/artisan ]; then
php bin/artisan "$@"
else
php artisan "$@"
fi
}
//On windows run this command, set the breakpoint and then activate the listener
SET "XDEBUG_CONFIG=idekey=PHPSTORM_XDEBUG remote_enable=1 remote_host=127.0.0.1 remote_port=9000 remote_handler=dbgp remote_mode=req"
//On linux run this command, set the breakpoint and then activate the listener
export "XDEBUG_CONFIG=idekey=PHPSTORM_XDEBUG remote_enable=1 remote_host=127.0.0.1 remote_port=9000 remote_handler=dbgp remote_mode=req"
var cacheFunc = 'Cache'+nomeCache;
if (typeof window[cacheFunc] === "function") {
window[cacheFunc](oggetto);
}
@Turaylon
Turaylon / create_and_dowload_infographic.php
Created January 29, 2016 12:03
Infor.am create and download Infographic
require('vendor/autoload.php');
use Infogram\InfogramRequest;
use Infogram\RequestSigningSession;
$consumerKey = 'XXXX';
$consumerSecret = 'XXX';
$session = new RequestSigningSession($consumerKey, $consumerSecret);
<?php namespace Mvs\Core;
use Config;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
use Mvs\Core\Console\MarioInstall;
class CoreServiceProvider extends ServiceProvider {
protected $configPath;
@Turaylon
Turaylon / .htaccess
Last active December 16, 2015 18:49
#codeigniter rewriter
#codeigniter rewriter
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
$.ajax({
type: "POST",
data: $("form").serialize(),
url: "file.php",
success: function(output, status, xhr) {
console.log(xhr.getResponseHeader());
},
error: function(output) {
$('.sysMsg').html(output);
}