Skip to content

Instantly share code, notes, and snippets.

View frugan-dev's full-sized avatar
🍎
VegDev

Frugan frugan-dev

🍎
VegDev
View GitHub Profile
@frugan-dev
frugan-dev / README.md
Last active October 25, 2023 21:34
Alternative to flex-gap-polyfill with TWBS 5

In a project with TWBS 5 I tried to use an alternative to flex-gap-polyfill, so I was wondering what advantage I might have in using one solution or the other.
Personally, the alternative I found seems simpler to me, but I would be happy to receive further feedback.

Basically I first added Modernizr which adds the class flexgap or no-flexgap on the html tag:

package.json
"devDependencies": {
@frugan-dev
frugan-dev / mysqldump.php
Last active September 3, 2021 15:05
Plugin for the RedBeanPHP ORM, which will create Backup files for a MySql DB Server.
<?php
declare(strict_types=1);
use RedBeanPHP\Facade as R;
//https://github.com/zewa666/RedBean_MysqlBackup
R::ext('mysqldump', function (string $file, int $step = 100) {
if (!(R::getWriter() instanceof \RedBeanPHP\QueryWriter\MySQL)) {
throw new Exception('This plugin only supports MySql.');
@frugan-dev
frugan-dev / siren.go
Created April 5, 2018 22:56 — forked from rafi/siren.go
Israel siren alert notifier implementation in PHP, Go and Python. Go and Python just parse.
package main
// Credits: http://stackoverflow.com/a/24683083/351947
import (
"encoding/binary"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"unicode/utf16"
@frugan-dev
frugan-dev / bootstrap-hover-dropdown.custom.js
Created December 17, 2017 10:05
bootstrap-hover-dropdown.custom.js
/**
* @preserve
* Project: Bootstrap Hover Dropdown
* Author: Cameron Spear
* Version: v2.2.1
* Contributors: Mattia Larentis
* Dependencies: Bootstrap's Dropdown plugin, jQuery
* Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
* License: MIT
* Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
@frugan-dev
frugan-dev / jquery_async_form.js
Created July 26, 2017 10:10
form[data-async]
//https://gist.github.com/havvg/3226804
//http://1000hz.github.io/bootstrap-validator/
//$(document).validator().on('submit', 'form[data-async]', function(e) { // va in conflitto con form data-sync
$('form[data-async]').validator().on('submit', function(e) {
$.fix_theme_callback();
if (!e.isDefaultPrevented()) {
e.preventDefault();
@frugan-dev
frugan-dev / flexbox.less
Created May 14, 2017 00:02 — forked from jayj/flexbox.less
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@frugan-dev
frugan-dev / auth.pl
Created October 31, 2016 13:44 — forked from mmriis/auth.pl
IMAP/POP3 proxy authentication script for nginx. See http://www.whatastruggle.com/nginx-as-an-imappop3-proxy-part-2.
#!/usr/bin/perl
use Digest::HMAC_MD5 qw/ hmac_md5_hex /;
use DBI;
use URI::Escape;
use CGI;
print "Content-type: text/html\n";
my $q = CGI->new;
@frugan-dev
frugan-dev / gist:052123eb909f58d3497370150636947e
Created October 30, 2016 20:11 — forked from seanmcn/gist:62a021a765ad4f8e593b
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@frugan-dev
frugan-dev / composer.json
Last active October 16, 2018 11:14
Wordpress action for multipart email with wp_mail function
{
"require": {
"soundasleep/html2text": "~0.3"
}
}
@frugan-dev
frugan-dev / composer.json
Created October 10, 2016 23:26
Zend Config Factory with preserveNumericKeys and operator params
{
"name": "root/zend-config-operator",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ewake/zend-config"
}
],
"require": {
"zendframework/zend-config": "dev-master",