Skip to content

Instantly share code, notes, and snippets.

View diegoarigony's full-sized avatar

Diego G Arigony diegoarigony

View GitHub Profile
@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

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
[
{
<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>
@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/ -->
"If you want to prevent browser sniffing, the CSS only solution is to set the ul or a container style to overflow: auto. If you look at the source through firebug, it's the way jQuery does it in their example."
god bless this guy
http://stackoverflow.com/questions/2451528/jquery-ui-sortable-scroll-helper-element-offset-firefox-issue

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@diegoarigony
diegoarigony / .htaccess
Last active August 29, 2015 14:06
Firefox CORS font problem
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://www.mysite.com.br"
</IfModule>
</FilesMatch>
# OR "http://mysite.com.br", etc
@diegoarigony
diegoarigony / style.css
Last active August 29, 2015 14:05
Force Acceleration in webkit - from http://davidwalsh.name/translate3d
/* warp speed ahead */
.animClass {
-webkit-transform: translate3d(0, 0, 0);
/* more specific animation properties here */
}
/* If your animation is still flickering after switching to the transform above,
you can use a few little-known CSS properties to try to fix the problem: */
.animClass {
@diegoarigony
diegoarigony / bounceoff.js
Created July 24, 2014 19:12
Disable mobile bounce effect
document.ontouchmove = function(event){
if( header_mb.hasClass('open') ) {
event.preventDefault();
}
}

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