Skip to content

Instantly share code, notes, and snippets.

View tagliala's full-sized avatar
🏢
Working from Rome

Geremia Taglialatela tagliala

🏢
Working from Rome
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tagliala on github.
  • I am tagliala (https://keybase.io/tagliala) on keybase.
  • I have a public key whose fingerprint is 8F1A 55B5 E8B3 9F60 590E FDF7 4A63 4443 0AD4 E29F

To claim this, I am signing this object:

@tagliala
tagliala / mysql56.sh
Created January 28, 2016 10:48
Switch from mysql56 to mysql
#!/bin/bash
if mysql --version | grep -q "Distrib 5.6"
then
echo "Deactivating MySQL 5.6";
mysql.server stop
brew unlink mysql56
mv /usr/local/var/mysql /usr/local/var/mysql56
mv /usr/local/var/mysql.prev /usr/local/var/mysql
brew link mysql
@tagliala
tagliala / test_425.rb
Created January 15, 2016 13:39
Rails 5 routing issue with prefixed optionals
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@tagliala
tagliala / SassMeister-input.scss
Created June 19, 2015 09:32
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin variable-icon-font($icon-code) {
content: #{"\"\\"}#{$icon-code + "\""};
}
@tagliala
tagliala / gist:7e2dcd600cc015b07a8a
Created January 21, 2015 14:39
Recursively optimize images
find . -name "*.jpg" -type f -exec jpegtran -copy none -optimize -progressive -outfile {} {} \;
find . -name "*.png" -type f -exec optipng {} \;
@tagliala
tagliala / gist:6cfe162c3294924e77da
Created August 28, 2014 08:18
Friendly Id bug with globalize
# Activate the gem you are reporting the issue against.
gem 'activerecord', '3.2.19'
gem 'friendly_id', '4.0.10.1'
gem 'globalize', '3.0.4'
gem 'i18n'
require 'active_record'
require 'friendly_id'
require 'globalize'
require 'minitest/autorun'

Ten days ago I submitted a question on StackOverflow: "How to profile CSS selectors?" [1] and I didn't get proper answers. I'm going to repost (and update) that question here for faster reading

  1. Google removed the CSS Profiler [2]

  2. Firefox doesn't have one [3]

  3. Opera had dragonfly, but now Opera is Blink based... and dragonfly is gone.

  4. The only profiler around there in Safari, doesn't work on my 7.0.0 / OSX 10.9. (it keeps recording CSS and I can't stop it)

@tagliala
tagliala / gist:7174356
Last active December 26, 2015 15:39
Tests FA
Comparison FA 3.2.1 vs 4.0.0 (in ms - lower is better)
http://tagliala.github.io/vectoriconsroundup/cssperf/fa321
http://tagliala.github.io/vectoriconsroundup/cssperf/fa400
Old hardware (Windows 7 x64)
BROWSER 3.2.1 4.0.0 %
Chrome 31 204 166 +22.9 (std dev 11ms/8ms)
Chrome 32 204 166 +22.9 (std dev 11ms/8ms)
Safari 5.1.7 140 103 +35.9 (std dev 18ms)
@tagliala
tagliala / 3.2.1.html
Created October 16, 2013 15:18
How to profile CSS selectors?
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<meta content='width=device-width, initial-scale=1.0' name='viewport'/>
<title>FA 3.2.1 performance test</title>
<script src="js/test.js"></script>
<link rel="stylesheet" href="css/font-awesome.3.2.1.min.css">
</head>
<body onload="test()" id="body" data-icon-class="icon"></body>
@tagliala
tagliala / forms.css
Created August 2, 2013 21:16
Firefox default forms.css
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
Styles for old GFX form widgets
**/
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */