Skip to content

Instantly share code, notes, and snippets.

View diegoarigony's full-sized avatar

Diego G Arigony diegoarigony

View GitHub Profile
@diegoarigony
diegoarigony / SCSS.md
Created July 13, 2017 11:44 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

Here's a list of API links to get your stats:
Facebook*: https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
Twitter: http://urls.api.twitter.com/1/urls/count.json?url=%%URL%%
Reddit:http://buttons.reddit.com/button_info.json?url=%%URL%%
LinkedIn: http://www.linkedin.com/countserv/count/share?url=%%URL%%&format=json
Digg: http://widgets.digg.com/buttons/count?url=%%URL%%
Delicious: http://feeds.delicious.com/v2/json/urlinfo/data?url=%%URL%%
StumbleUpon: http://www.stumbleupon.com/services/1.01/badge.getinfo?url=%%URL%%
Pinterest: http://widgets.pinterest.com/v1/urls/count.json?source=6&url=%%URL%%
@diegoarigony
diegoarigony / index.html
Created June 27, 2016 17:45
Detect AdBlock
<script>
window.adblock = true;
if( window.adblock ) {
alert('adblock ativo');
} else {
alert('adblock inativo');
}
</script>
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@diegoarigony
diegoarigony / HeidiDecode.js
Created March 29, 2016 16:30 — forked from jpatters/HeidiDecode.js
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
@diegoarigony
diegoarigony / remove_duplicated.sql
Created February 11, 2016 16:32
Remove duplicated entries from mysql db - From http://stackoverflow.com/a/3312066/3641927
ALTER IGNORE TABLE jobs
ADD UNIQUE INDEX idx_name (site_id, title, company);
<?php
dd($request->file('foto'), $request->file('foto')->getErrorMessage());
<?php
$input = array_map("unserialize", array_unique(array_map("serialize", $input)));
@diegoarigony
diegoarigony / CSScomb.sublime-settings
Last active November 6, 2015 10:30
CSScomb ST3 alphabetical order
{
"config": {
"sort-order-fallback": "abc",
"sort-order": [
[
"-moz-animation",
"-moz-animation-delay",
"-moz-animation-direction",
"-moz-animation-duration",
"-moz-animation-iteration-count",
find . -name '*.*' -exec sh -c '
a=$(echo "$0" | sed -r "s/([^.]*)\$/\L\1/");
[ "$a" != "$0" ] && mv "$0" "$a" ' {} \;