Skip to content

Instantly share code, notes, and snippets.

View diegoarigony's full-sized avatar

Diego G Arigony diegoarigony

View GitHub Profile
::-webkit-input-placeholder { /* WebKit browsers */ color:#999; }
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color:#999; opacity:1; }
::-moz-placeholder { /* Mozilla Firefox 19+ */ color:#999; opacity:1; }
:-ms-input-placeholder { /* Internet Explorer 10+ */ color:#999; }
/* FOCUS */
input:focus::-webkit-input-placeholder, textarea:focus::-webkit-input-placeholder { color:#a8a8a8 !important; }
input:focus:-moz-placeholder, textarea:focus:-moz-placeholder { color:#a8a8a8 !important; opacity:1; }
input:focus::-moz-placeholder, textarea:focus::-moz-placeholder { color:#a8a8a8 !important; opacity:1; }
input:focus:-ms-input-placeholder, textarea:focus:-ms-input-placeholder { color:#a8a8a8 !important; }
@diegoarigony
diegoarigony / css3-gradients.scss
Created April 25, 2014 14:25
CSS3 Linear Gradient
.content-block .small-btn { border:0; height:40px; width:121px;
-ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffffff", endColorstr="#ffe6e6e6")';
background: linear-gradient(
to bottom,
#fff,
#e6e6e6);
background: -moz-linear-gradient(
top,
#fff 0%,
#e6e6e6);

The list

Ada is a tank. A butt-ugly tank that never breaks down. People laugh uncontrollably if you tell them you drive Ada, but really, do you want to be driving a sports car in a war zone? [from Amit Dubey]

Assembly Language is a bare engine; you have to build the car yourself and manually supply it with gas while it's running, but if you're careful it can go like a bat out of hell.

[From "Subterfug" off digg.com:]

Assembly Language: you are the car.

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 / bounceoff.js
Created July 24, 2014 19:12
Disable mobile bounce effect
document.ontouchmove = function(event){
if( header_mb.hasClass('open') ) {
event.preventDefault();
}
}
@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 / .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

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

"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