Skip to content

Instantly share code, notes, and snippets.

View jatubio's full-sized avatar

Juan Antonio Tubio jatubio

View GitHub Profile
@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 - [email protected] */
/* 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 / alias.cmd
Created May 19, 2015 21:36
Alias to develop on Windows with Laravel
@echo off
:::: Commands ::::
:: DosKey ::
:: Creates a new alias
doskey dk=doskey $*
:: Lists current aliases
doskey dkm=doskey /macros
@jatubio
jatubio / getRandomTimestamps
Last active November 26, 2020 11:52
Get random dates for created_at and updated_at fields on Laravel Framework using Carbon package
<?php
function getRandomTimestamps($backwardDays = null)
{
if ( is_null($backwardDays) )
{
$backwardDays = -800;
}
@jatubio
jatubio / BaseSeeder
Created May 10, 2015 22:13
Solución alternativa a la lección 1.9 Seeders con llaves foráneas
<?php
use Illuminate\Database\Seeder;
/**
* Created by PhpStorm.
* User: kali
* Date: 10/05/2015
* Time: 13:57
*/
<?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 / composer.json
Created May 2, 2015 17:29
Laravel 5.1 composer.json file
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.1.*"
},
"require-dev": {
@jatubio
jatubio / installcomposer.bat
Last active November 14, 2024 03:52
Install composer as portable on Windows and increases Timeout
@ECHO OFF
REM Installs Composer as portable and setup home folder as composer global config folder and local folder as internal cache
REM v.2.0 - 01/05/2015
REM [email protected]
REM Set Home folder as Composer Global Configuration Folder
SET COMPOSER_HOME=%~dp0Home
if not exist %COMPOSER_HOME% md "%COMPOSER_HOME%"
php -r "readfile('https://getcomposer.org/installer');" | php
@jatubio
jatubio / web.config
Created April 29, 2015 03:49
IIS web.config file for Laravel 5
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- Quitar los slash '/' del final de la ruta -->
<rule name="RewriteRequestsToPublic">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<!--//
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
@jatubio
jatubio / ReplaceIniValue_Sample3.ps1
Created April 17, 2015 11:16
PowerShell. Ini Files. Replacing a value in a key inside a section sample 3.
# Ini files
# Replacing a value in a key inside a section sample
#
# Calling Windows API function WritePrivateProfileString
# And using some C# code
#
# http://stackoverflow.com/questions/29688299/powershell-and-regex-how-to-replace-a-ini-name-value-pair-inside-a-named-sectio/29688435#29688435
$source = @"