Skip to content

Instantly share code, notes, and snippets.

View jatubio's full-sized avatar

Juan Antonio Tubio jatubio

View GitHub Profile
<!--//
Kachun
Copyright (c) 2008 Fabio Zendhi Nagao <http://zend.lojcomm.com.br/>
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
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="20" columns="98" buffer_rows="500" buffer_columns="0" init_dir="C:\Users\Kevin\Desktop" start_hidden="0" save_size="1" shell="C:\Program Files (x86)\Git\bin\sh.exe --login -i">
<colors>
<color id="0" r="0" g="43" b="54"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>
<color id="5" r="211" g="54" b="130"/>
@jatubio
jatubio / github-solarized.css
Created May 20, 2015 16:28
GitHub Solarized stylesheet for MarkdownPad
/* GitHub Solarized stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Juan Antonio Tubio - jatubio@gmail.com */
/* Source: https://gist.github.com/jatubio/75d85817208972f951ef */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
@jatubio
jatubio / .gitconfig
Created May 20, 2015 22:24
Alias to find files on Git repositories.
### Files
# Find if one file ever had into repository
ff = "!git log --pretty=format: --name-status --all -M -B | sort -u | grep $1 -i #"
# The same as above but showing copied files
ffc = "!git log --pretty=format: --name-status --all -C -M -B | sort -u | grep $1 -i #"
# Show Untracked files on stash
sfu = "!git rev-list -g stash | git rev-list --stdin --max-parents=0 | xargs git show --stat"
@jatubio
jatubio / DatabaseTransactions.php
Last active August 29, 2015 14:21
Laravel 5.1 - Using DatabaseTransactions with custom connections on Testing
<?php namespace JaTubio\Testing;
trait DatabaseTransactions {
protected function getConnectionName()
{
$model = $this->getModel();
if ( null !== $model )
{
@jatubio
jatubio / helper.php
Created May 24, 2015 18:11
array_change_key_case for stdClass Objects
// Works withs stdClass Objects
static function array_change_key_case($input, $case )
{
$array = array_change_key_case((array)$input, $case );
return (object) $array;
}
@jatubio
jatubio / gitlaravel.bat
Created June 16, 2015 00:08
git post-commit hook to run PHP-CS-Fixer on windows after one commit
@Echo off
REM ADD PHP TO PATH See PHP-CS-Fixer bug on https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1253
set PATH=%PATH%;"D:\DevApps\PHP5.6.6"
IF "%LARAVEL%"=="1" (
SET LARAVEL=0
echo "End commit of PHP-CS-Fixer"
) ELSE (
SET LARAVEL=1
echo "PHP-CS-Fixer"
"D:\DevApps\PHP5.6.6\php.exe" "%~dp0php-cs-fixer.phar" --verbose fix --config-file=.php_cs
@jatubio
jatubio / cdir.bat
Last active August 29, 2015 14:23
Compare directories first level names
@echo off
setlocal enabledelayedexpansion
SET DestinationDrive=Z
SET TotalDuplicated=0
call :source "%~1"
rem echo source set to %source% from %~1
call :destination "%~2" %source%
rem echo destination set to %destination% from %~2 and %source%
@jatubio
jatubio / clonelndir.bat
Last active August 29, 2015 14:23
Clone first level subdirectories to destination using ln.exe
@echo off
setlocal enabledelayedexpansion
SET DestinationDrive=Z
call :source "%~1"
rem echo source set to %source% from %~1
call :destination "%~2" %source%
rem echo destination set to %destination% from %~2 and %source%
@jatubio
jatubio / cloneln.bat
Last active August 29, 2015 14:23
Clone source to destination using ln.exe
@echo off
setlocal enabledelayedexpansion
setlocal
set DestinationDrive=Z
set includeDir=
goto :include
:main