Skip to content

Instantly share code, notes, and snippets.

View brutuscat's full-sized avatar

Mauro Asprea brutuscat

View GitHub Profile
[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 / 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
@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'

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:

$(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")')
@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/[email protected]/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@undecaf/[email protected]/dist/index.js"></script>
<script>
try {
window['BarcodeDetector'].getSupportedFormats()
} catch {
window['BarcodeDetector'] = barcodeDetectorPolyfill.BarcodeDetectorPolyfill