Skip to content

Instantly share code, notes, and snippets.

View diegoarigony's full-sized avatar

Diego G Arigony diegoarigony

View GitHub Profile
@diegoarigony
diegoarigony / a.html
Created February 20, 2015 10:56
Responsive square
<div style="width:20%;padding-bottom:20%;background-color:red">
<div>
Content goes here
</div>
</div>
<!-- http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/ -->
<object id="ytplayer" style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/8Ax-dAR3ABs?version=3&enablejsapi=1">
<param name="allowScriptAccess" value="always">
<embed id="ytplayer" src="http://www.youtube.com/v/8Ax-dAR3ABs?version=3&enablejsapi=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390">
</object>
<a href="javascript:document.getElementById('ytplayer').stopVideo()">Play</a>
For anyone else who wants to set Eclipse style goto definition, you need to create .sublime-mousemap file in Sublime User folder.
Windows - create Default (Windows).sublime-mousemap in %appdata%\Sublime Text 3\Packages\User
Linux - create Default (Linux).sublime-mousemap in ~/.config/sublime-text-3/Packages/User
Mac - create Default (OSX).sublime-mousemap in ~/Library/Application Support/Sublime Text 3/Packages/User
Now open that file and put the following configuration inside
[
{
@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

find . -name '*.*' -exec sh -c '
a=$(echo "$0" | sed -r "s/([^.]*)\$/\L\1/");
[ "$a" != "$0" ] && mv "$0" "$a" ' {} \;
@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",
<?php
$input = array_map("unserialize", array_unique(array_map("serialize", $input)));
<?php
dd($request->file('foto'), $request->file('foto')->getErrorMessage());
@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);
@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'));