Skip to content

Instantly share code, notes, and snippets.

View diegoarigony's full-sized avatar

Diego G Arigony diegoarigony

View GitHub Profile

Every single programming language serves one purpose: explain to the computer what we want it to do. HTML is... not a programming language, it's a markup language, which basically means text formatting. XML and JSON are in the same category The rest of languages fall in 4 general categories:

  • Assembler is (edit: for every intent and purpose) the native language of the machine. Each CPU has it's own version, and they are somewhat interoperable (forward compatibility mostly).
  • system languages(C and C++ ) . They are used when you need to tell the computer what to do, as well as HOW to do it. A program called a compiler interprets the code and transforms it into assembler.
  • application languages( Java and C#). Their role is to provide a platform on which to build applications using various standardized ways of working.
  • scripting languages(Python, and Perl). The idea behind them is that you can build something useful in the minimal amount of code possible.

Then you have various hybrid languages that fit in

@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>
@diegoarigony
diegoarigony / shortcuts.md
Last active May 31, 2016 11:08
Useful keyboard shortcuts

WINDOWS:

Super + D = Show Desktop
Super + M = Minimize all windows
Super + E = Launch explorer
Super + R = Run Command
Super + Shift + M = Maximize all windows
Super + L (XP) = Lock OS
Super + S = Launch Search

Alt + Tab = Shift between Windows

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)));