This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Opacity Prefix | |
// $level must be between 0 and 1 | |
@mixin opacity($level) { | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="$level*100")"; | |
filter: alpha(opacity=$level*100); | |
opacity: $level; | |
} | |
//Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*RESET*/ | |
* {margin:0;padding:0;text-decoration:none;font-size:1em;outline:none;} | |
code, kbd, samp, pre, tt, var, textarea, input, select, isindex, listing, xmp, plaintext{font:inherit;font-size:1em;white-space:normal; } | |
/*dfn, i, cite, var, address, em { font-style: normal; }*/ | |
a, img, a img, iframe, form, fieldset, abbr, acronym, object, applet, table { border: none; } | |
table { border-collapse: collapse; border-spacing: 0; } | |
caption, th, td, center { text-align: left; vertical-align: top; } | |
q { quotes: "" ""; } | |
ul, ol, dir, menu { list-style: none; } | |
sub, sup { vertical-align: baseline; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Visibles | |
defaults write com.apple.Finder AppleShowAllFiles YES | |
KillAll Finder | |
// Hidden | |
defaults write com.apple.Finder AppleShowAllFiles NO | |
KillAll Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'rubygems' | |
require 'xmlsimple' | |
xmlUrl = 'http://opendata.5t.torino.it/get_pk' | |
xml_data = Net::HTTP.get_response(URI.parse(xmlUrl)).body | |
data = XmlSimple.xml_in(xml_data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin clear() { | |
&:before, &:after { | |
content: "\0020"; | |
display: block; | |
height: 0; | |
overflow: hidden; | |
} | |
&:after { | |
clear: both; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vendorize($property, $value) { | |
-webkit-#{$property}: $value; | |
-moz-#{$property}: $value; | |
-ms-#{$property}: $value; | |
-o-#{$property}: $value; | |
#{$property}: $value; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) { | |
// HTTPS code | |
} else { | |
// HTTP code | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION `lat_lng_distance` (lat1 FLOAT, lng1 FLOAT, lat2 FLOAT, lng2 FLOAT) | |
RETURNS FLOAT | |
DETERMINISTIC | |
BEGIN | |
RETURN 6371 * 2 * ASIN(SQRT( | |
POWER(SIN((lat1 - abs(lat2)) * pi()/180 / 2), | |
2) + COS(lat1 * pi()/180 ) * COS(abs(lat2) * | |
pi()/180) * POWER(SIN((lng1 - lng2) * | |
pi()/180 / 2), 2) )); | |
END |
OlderNewer