This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# UpToGit 0.1 | |
# Actualiza facilmente tu repositorio Git | |
# (CC) 2011 Alfonso Saavedra "Son Link" | |
# http://sonlinkblog.blogspot.com | |
# Bajo licencia GNU/GPL | |
# Modo de uso: copia o mueve este script a /usr/bin o /usr/local/bin y desde el directorio donde se encuentre la copia de un repo git, ejecútalo de esta manera: | |
# uptogit <ficheros> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
([一-龯]) | |
Regex for matching Hirgana or Katakana | |
([ぁ-んァ-ン]) | |
Regex for matching Non-Hirgana or Non-Katakana | |
([^ぁ-んァ-ン]) | |
Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function number_format(amount, decimals) { | |
amount += ''; // por si pasan un numero en vez de un string | |
amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
decimals = decimals || 0; // por si la variable no fue fue pasada | |
// si no es un numero o es igual a cero retorno el mismo cero | |
if (isNaN(amount) || amount === 0) | |
return parseFloat(0).toFixed(decimals); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4 | |
# @link http://tech.zumba.com/2014/04/14/control-code-quality/ | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document, JSON){ | |
"use strict"; | |
var SEP = '|', ua, opera, ie; | |
/* | |
* Collect Browser & Device Data | |
*/ | |
var Collector = { | |
/* | |
* MD5 Checksum calculation | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return Symfony\CS\Config\Config::create() | |
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) | |
->fixers([ | |
'short_array_syntax', | |
'ordered_use', | |
]) | |
; |
#Set DB_CONNECTION to use sqlite in-memory database when testing
- Open `phpunit.xml' file in the current project
- Add the following environment variables to the appropriate section
<env name="DB_CONNECTION" value="sqlite">
<env name="DB_DATABASE" value=":memory:">
- in
config\database.php
file, change the defaultsqlite
connection to
'connections' => [
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
OlderNewer