Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.
/* | |
* Minimal classList shim for IE 9 | |
* By Devon Govett | |
* MIT LICENSE | |
*/ | |
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') { | |
Object.defineProperty(HTMLElement.prototype, 'classList', { | |
get: function() { |
<?php | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $product; |
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
This snippet filters oEmbed output in WordPress (the_content()
) to force responsive embeds.
To use, add the contents of responseive_embeds.less
to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed
rule outside of .embed-container
and change it to .embed-container iframe,.embed-container object,.embed-container embed
).
Then add the responsive_embed()
function to your theme's functions.php
and insert the add_filter()
call in your theme's setup function.
afghanistan : Afghanistan | |
albania : Albania | |
algeria : Algeria | |
american_samoa : American Samoa | |
andorra : Andorra | |
angola : Angola | |
anguilla : Anguilla | |
antigua_and_barbuda : Antigua and Barbuda | |
argentina : Argentina | |
armenia : Armenia |
<?php | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
I recently began working with Node and MongoDB for a small personal project, largely just to learn the technologies. One thing that is fairly simple but that I found far from obvious and lacking in concrete examples was how to populate the part of my database that used referenced collections from the sample JSON data I was starting with. This post attempts to fill that gap using the following code snippets, which are heavily commented inline. You will notice I am using the awesome Mongoose library which makes working with MongoDB very easy.
http.createServer( app ).listen( app.get( 'port' ), function() {
mongoose.connect( 'mongodb://localhost/{YOUR_DB_NAME}' );
var db = mongoose.connection;
Downloads 64 bits: | |
sc_serv: https://dl.dropbox.com/s/awj65gxyighz4ro/sc_serv2_linux_x64-latest.tar.gz?dl=1 | |
sc_trans: https://dl.dropbox.com/s/ol88p5cwy9ivhvx/sc_trans_linux_x64_10_07_2011.tar.gz?dl=1 | |
Downloads 32 bits: | |
sc_serv: [FALTANDO] | |
sc_trans: https://dl.dropbox.com/s/zfmfh0ahdv7mjx0/sc_trans_linux_10_07_2011.tar.gz?dl=1 | |
Para baixar o último sc_serv vá até: https://www.shoutcast.com/BroadcastNow |
# Este arquivo deve ficar em /home/radio/config.cfg ou qualquer outro PATH que desejar... | |
# As variaveis aqui contidas já existem no script /etc/init.d/shoutcas porem serão sobre-escritas se você preferir. | |
# Diretórios não pesquisados durante a criação da lista | |
EXCLUDE="Vinhetas|Amado Batista|Barrerito" | |
# Shoutcast Vars | |
#HOME="/home/radio" | |
#SHOUT_HOME="/home/radio/shoutcast" | |
#SHOUT_PID=$(pidof sc_serv) |