<button>Let's Go !</button>
This file contains 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
/* Gmail style scrollbar */ | |
::-webkit-scrollbar { | |
width: 12px | |
} | |
::-webkit-scrollbar-thumb { | |
border-width: 1px 1px 1px 2px | |
} | |
::-webkit-scrollbar-track { | |
border-width: 0 | |
} |
This file contains 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
/** | |
* Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation | |
* and a couple other places I don't recall at the moment. This data is compatible with the Braintree | |
* Payment API as of Dec 2011 | |
* | |
* Compiled by Steve Kamerman, 2011 | |
*/ | |
SET FOREIGN_KEY_CHECKS=0; | |
-- ---------------------------- |
This file contains 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
/* | |
https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css | |
p,m = padding,margin | |
a,t,r,b,l,h,v = all,top,right,bottom,left,horizontal,vertical | |
s,m,l,n = small(5px),medium(10px),large(20px),none(0px) | |
*/ | |
.ptn, .pvn, .pan { padding-top: 0px !important; } | |
.pts, .pvs, .pas { padding-top: 5px !important; } |
This file contains 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
<!-- | |
English: | |
This example show how do a simple MVVM code with html+js | |
You can change the data in design and the object person will be changed, you can too make the change by the console(js) of the property from the object and the visual will be changed. | |
Portugues: | |
Esse exemplo mostra como fazer um simples MVVM framework com HTML e JS | |
Você pode alterar os dados visualmente e o objeto pessoa vai ser alterado e também se você fizer a alteração via console da propriedade o visual será modificado. | |
--> | |
<!DOCTYPE html> | |
<html> |
This file contains 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
<?php | |
// requires php5 | |
define('UPLOAD_DIR', 'images/'); | |
$img = $_POST['img']; | |
$img = str_replace('data:image/png;base64,', '', $img); | |
$img = str_replace(' ', '+', $img); | |
$data = base64_decode($img); | |
$file = UPLOAD_DIR . uniqid() . '.png'; | |
$success = file_put_contents($file, $data); | |
print $success ? $file : 'Unable to save the file.'; |
This file contains 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
$(“[attribute|=’value’]”) — The “attribute contains prefix selector” returns all elements with attributes whose value is equal to or starts with the given string followed by a hyphen. | |
$(“[attribute*=’value’]”) — This “attribute contains selector” returns all elements with attributes whose value contains the given substring. The location of the value doesn’t matter. As long as it matches with the given value the selector will select the element. | |
$(“[attribute~=’value’]”) — This selector returns all elements with attributes whose value contains a given word delimited by spaces. | |
$(“[attribute$=’value’]”) — This selector returns all elements with attributes whose value ends with the given string. | |
$(“[attribute=’value’]”) — This selector returns all elements with attributes whose value is exactly equal to a given string. |
This file contains 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
var domIsReady = (function(domIsReady) { | |
var isBrowserIeOrNot = function() { | |
return (!document.attachEvent || typeof document.attachEvent === "undefined" ? 'not-ie' : 'ie'); | |
} | |
domIsReady = function(callback) { | |
if(callback && typeof callback === 'function'){ | |
if(isBrowserIeOrNot() !== 'ie') { | |
document.addEventListener("DOMContentLoaded", function() { | |
return callback(); |
This file contains 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
// Bind up a couple of event handlers | |
$("#foo").on({ | |
click: function(){ alert("Hello") }, | |
mouseout: function(){ alert("World") } | |
}); | |
// Lookup events for this particular Element | |
$._data( $("#foo")[0], "events" ); |
This file contains 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
javascript:(function(){var styles = document.querySelectorAll('link[rel=\'stylesheet\']'); for (var s = 0; s < styles.length; s++) {styles[s].mediax = styles[s].media;if (styles[s].media === 'only x') { styles[s].media = styles[s].mediax; } else if (styles[s].media !== 'print') {styles[s].media = 'only x';}}})(); |
OlderNewer