Skip to content

Instantly share code, notes, and snippets.

View brutuscat's full-sized avatar

Mauro Asprea brutuscat

View GitHub Profile
@brutuscat
brutuscat / index.html
Last active September 29, 2022 17:00 — forked from bellbind/index.html
[chrome][android] BarcodeDetector example
<!doctype html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.9.11/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@undecaf/barcode-detector-polyfill@0.9.13/dist/index.js"></script>
<script>
try {
window['BarcodeDetector'].getSupportedFormats()
} catch {
window['BarcodeDetector'] = barcodeDetectorPolyfill.BarcodeDetectorPolyfill
$(document).ready(function() {
$('#toc ~ #content-text > div > h1').removeAttr('class');
$('#toc ~ #content-text > div > h1 > span').removeAttr('class');
$('#toc ~ #content-text > div > h2').removeAttr('class');
$('#toc ~ #content-text > div > h2 > span').removeAttr('class');
$('#toc .h3, #toc .h4, #toc .h5, #toc .h6').remove();
$('#toc .h1 > span, #toc .h2 > span').removeAttr('class');
$('#toc ~ #content-text > table').prev().remove();
var startsWithEnglish = /^English/;
$('table tr:nth-child(1) td:nth-child(1):contains("English")')

Keybase proof

I hereby claim:

  • I am brutuscat on github.
  • I am brutuscat (https://keybase.io/brutuscat) on keybase.
  • I have a public key ASDgS_cyBl4v6dvm6-XtcW9EZRvq76RceFsQbbyUYF9ZjAo

To claim this, I am signing this object:

@brutuscat
brutuscat / gist:1ca90fffb6a03c69faa8
Last active September 8, 2015 10:25 — forked from arichazan/gist:11b579c873e4a043c88d
doesPaymentMatchOptions
/*
* tests whether payment matches options
*
* returns 'true' if matches, 'false' otherwise
*
* $opts is an array of options to filter the payments by
* possible values are
* 'withoutPrefix' => 'prefix' - only select payment without this prefix
* 'withPrefix' => 'prefix' - only select payment with this prefix
* if no options are provided, always returns 'true'
@brutuscat
brutuscat / MysqlHelper.php
Last active August 29, 2015 14:08
Codeception workaroung to load the dump.sql using the mysql cli binary
<?php
namespace Codeception\Module;
use Codeception\Lib\Driver\Db as Driver;
use Codeception\Exception\Module as ModuleException;
use Codeception\Exception\ModuleConfig as ModuleConfigException;
use Codeception\Configuration as Configuration;
class MysqlHelper extends \Codeception\Module\Db
[client]
[mysqld]
init-connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
max_allowed_packet='100M'
innodb_doublewrite=0
innodb_flush_log_at_trx_commit=2
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_VALUE_ON_ZERO
@brutuscat
brutuscat / 99java
Last active August 29, 2015 14:02 — forked from dz0ny/99java
## Setup java
if [ `uname -m` == 'x86_64' ]; then
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/"
else
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=
Introduction
The mobile games industry is a multi-billion dollar industry - mobile gaming is
big business and is set to continue growing at an alarming rate. Smart phone
and tablet market penetration is increasing exponentially, with over one billion
units sold worldwide in 2013 alone. The power of mobile gaming devices is
increasing just as fast: mobile processing power has developed to the extent
that smartphones and tablets can produce near console-quality graphics.
At the same time, digital marketplaces have become crowded, and the cost of
raising your head above the parapet through user acquisition has never been
higher. The mobile games industry is under increasing pressure to perform,
@brutuscat
brutuscat / 1 - Calendario Laboral de España.md
Last active January 2, 2016 01:09
[Festivos 2014] Calendario Laboral de España

[2014] Calendario Laboral de España

El calendario laboral de 2014 recoge un total de nueve fiestas nacionales comunes a todas las comunidades autónomas, según se aprobó en Noviembre del 2013 por la Dirección General de Empleo.

En total, en España suele haber diez festivos nacionales, dos de las comunidades autónomas y dos fiestas locales.

En concreto, las nueve fiestas nacionales son el 1 de enero (Año Nuevo), el 6 de enero (Epifanía del Señor), el 18 de abril (Viernes Santo), el 1 de mayo (Fiesta del Trabajo), el 15 de agosto (Asunción de la Virgen), el 1 de noviembre (Día de Todos los Santos), el 6 de diciembre (Día de la Constitución española), el 8 de diciembre (La Inmaculada Concepción) y el 25 de diciembre (Natividad del Señor).