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 | |
// Lettore Feed Atom come xml | |
// Requisito minimo php5 | |
// Funzione che limita il numero di caratteri di una stringa | |
function strlimit($string, $limit) { | |
if (strlen($string) > $limit) { | |
$string = substr($string, 0, strrpos(substr($string, 0, $limit), ' ')) . '...'; | |
} |
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 | |
require_once(dirname(__FILE__) . '/csscrush/CssCrush.php'); | |
$options = array( | |
'debug' => true, | |
'cache' => false, | |
'versioning' => false | |
); | |
$compiled_file = csscrush_file( dirname(__FILE__) .'/css/style.css', $options ); | |
?> | |
<link rel="stylesheet" type="text/css" href="<?php echo $compiled_file; ?>" media="all" /> |
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
SET FOREIGN_KEY_CHECKS=0; | |
-- Here's where we reset the orders | |
TRUNCATE `sales_flat_order`; | |
TRUNCATE `sales_flat_order_address`; | |
TRUNCATE `sales_flat_order_grid`; | |
TRUNCATE `sales_flat_order_item`; | |
TRUNCATE `sales_flat_order_status_history`; | |
TRUNCATE `sales_flat_quote`; | |
TRUNCATE `sales_flat_quote_address`; |
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
(function countWatchers() | |
{ | |
var root = angular.element(document.getElementsByTagName('body')).injector().get('$rootScope'); | |
var count = root.$$watchers ? root.$$watchers.length : 0; // include the current scope | |
var pendingChildHeads = [root.$$childHead]; | |
var currentScope; | |
while (pendingChildHeads.length) | |
{ | |
currentScope = pendingChildHeads.shift(); |
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
angular | |
.module('angularJst', []) | |
.config([ | |
'$provide', | |
function($provide) { | |
$provide.decorator('$templateCache', function($delegate, $sniffer) { | |
var originalGet = $delegate.get; | |
$delegate.get = function(key) { | |
var value; |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
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
# Deflate | |
<IfModule mod_filter.c> | |
#Add deflate | |
AddOutputFilterByType DEFLATE "application/atom+xml" \ | |
"application/javascript" \ | |
"application/json" \ | |
"application/ld+json" \ | |
"application/manifest+json" \ | |
"application/rdf+xml" \ |
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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
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
// loop that generates margin ad padding helper classes | |
// the output is like .margin-5, .margin-top-5, margin-right-5 etc... | |
$properties: (margin, padding); | |
$sides: (top, right, bottom, left); | |
@each $prop in $properties { | |
@for $i from 1 through 14 { | |
.#{$prop}-#{$i*5} { | |
#{$prop}: #{$i*5}px !important; | |
} | |
@each $side in $sides { |
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
sudo kextunload /System/Library/Extensions/AppleStorageDrivers.kext/Contents/PlugIns/AppleUSBCardReader.kext; | |
sudo kextload /System/Library/Extensions/AppleStorageDrivers.kext/Contents/PlugIns/AppleUSBCardReader.kext |