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 | |
define('HASH', 'BestRandomHashEver'); | |
$erro = $ok = ''; | |
if (empty($_POST['usuario']) || empty($_POST['contrasinal'])) { | |
$erro = 'Sentímolo, os datos enviados non son correctos'; | |
return false; | |
} |
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 | |
define('HASH', 'BestRandomHashEver'); | |
$erro = $ok = ''; | |
if (empty($_POST['usuario']) || empty($_POST['contrasinal'])) { | |
$erro = 'Sentímolo, os datos enviados non son correctos'; | |
return false; | |
} |
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 | |
$urls = array( | |
'http://google.com/', | |
'https://google.com/', | |
'https://google.com?q=Google', | |
'https://google.com/search?q=Google', | |
'https://google.com/search/?q=Google&limit=10', | |
'https://google.com/search/?q=Google#results', | |
); |
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 | |
Interface iDB | |
{ | |
public function __construct ($opcions); | |
public function gardar ($chave, $valor); | |
public function recuperar ($chave); | |
public function borrar ($chave); | |
public function existe ($chave); | |
} |
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 | |
define('HASH', 'BestRandomHashEver'); | |
$erro = $ok = ''; | |
if (empty($_POST['usuario']) || empty($_POST['contrasinal'])) { | |
$erro = 'Sentímolo, os datos enviados non son correctos'; | |
return false; | |
} |
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 | |
url=$1 | |
if [ "`echo $url | grep 'flickr.com'`" == '' ]; then | |
echo '' | |
echo 'This url seems not to be a flickr url ('$url')' | |
echo '' | |
exit 1 |
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
// Usage <button type="button" data-print=".section-to-print">Print</button> | |
(function ($) { | |
'use strict'; | |
$('[data-print]').on('click', function (e) { | |
e.preventDefault(); | |
var $this = $(this), | |
$print = $($this.data('print')); |
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 | |
HEADER_START='ALL_HEADERS_START_WITH_THIS' | |
DELETE_PREVIOUS_CSV=true | |
FILE='merged-xls.csv' | |
if [ "$DELETE_PREVIOUS_CSV" == "true" ]; then | |
rm -f *.csv | |
fi |
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 | |
download=$(wget -q https://about.gitlab.com/downloads/ -O - | grep -oh 'https://downloads-packages.s3.amazonaws.com/ubuntu-14.04.*\.deb') | |
deb=$(basename "$download") | |
if [ -f "$deb" ]; then | |
echo '' | |
echo 'No updates. Last update deb is '$deb | |
echo '' |
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 | |
composer.phar self-update > /dev/null 2> /dev/null | |
composer.phar "$@" | |
exit 0 |
OlderNewer