Skip to content

Instantly share code, notes, and snippets.

View dariodiaz's full-sized avatar

Dario Diaz dariodiaz

View GitHub Profile
@dariodiaz
dariodiaz / decrypt_dbeaver.py
Created June 4, 2021 18:37 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@dariodiaz
dariodiaz / belongs-to-many.sublime-snippet
Created March 22, 2016 20:08 — forked from adamwathan/belongs-to-many.sublime-snippet
Eloquent Relationship snippets for Sublime Text
<snippet>
<content><![CDATA[
public function ${1:relationship}()
{
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table});
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>belt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@dariodiaz
dariodiaz / powerline-shell-install.md
Created September 10, 2015 00:09 — forked from tos-kamiya/powerline-shell-install.md
Config: Powerline-shell install
@dariodiaz
dariodiaz / WebDesignContract.md
Created May 12, 2015 14:30 — forked from pjrvs/WebDesignContract.md
freelance: sample web design contract

Web Design Contract (open-source)

Between [your name] and [their name]

Summary:

You ([their name]), located at [customer address] are hiring me ([your name]) located at [company address] to [design and develop a web site] for the estimated total price of [total] as outlined in our previous correspondence.

What do both parties agree to do?

@dariodiaz
dariodiaz / deploy.php
Last active August 29, 2015 14:19 — forked from krisnoble/deploy.php
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';

###Edit this file

/etc/nginx/nginx.conf

###Add this line anywhere inside the http { } block:

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

###Go to your Forge panel and restart Nginx

@dariodiaz
dariodiaz / gist:43abad1d4ca65e947461
Last active August 29, 2015 14:05 — forked from assertchris/gist:3bd36713c0a4753ff96b
php: find files in path with extension
<?php
/**
* @param $path
* @param $extension
*
* @return array
*/
function getFilesInPathWithExtension($path, $extension)
{
@dariodiaz
dariodiaz / ProjectController.php
Created May 7, 2014 02:39 — forked from lucadegasperi/ProjectController.php
php: Laravel controller cleanup
<?php
class ProjectController extends BaseController implements ProjectCreatorDelegate
{
public function store()
{
$creator = new ProjectCreator($this);
return $creator->create(Input::all());
}
@dariodiaz
dariodiaz / xdebug-profiling.ini
Created May 5, 2014 19:52 — forked from dhrrgn/xdebug-profiling.ini
config: Xdebug Profiling
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/vagrant/cachegrind"
xdebug.profiler_output_name = "callgrind.out.%t.%p"
@dariodiaz
dariodiaz / VagrantXDebug.md
Created May 5, 2014 19:32 — forked from dhrrgn/VagrantXDebug.md
config: Vagrant and PhpStorm debug config

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1