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
$(document).ready(function() { | |
$('.nav li:not(.page-item-48) a').click(function(e) { | |
e.preventDefault(); | |
if($('.nav li.page-item-48').is('.current_page_item')){ | |
window.location.href = '/'; | |
}else{ | |
var tokens = $(this).attr('href').split('/'); | |
window.location.hash = tokens[tokens.length - 2]; | |
} |
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
window.app = angular.module('myApp', []); | |
window.app.controller('mainController', function($scope){ | |
$scope.title = "Demo"; | |
$scope.$on('ready', function(){ | |
$('#btn').click(function(){ | |
console.log('Controller: click'); | |
}); | |
}); |
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
module.exports = (function() { | |
var fizzFun = function(n){ | |
if (n % 3 == 0) | |
return 'fizz'; | |
}; | |
var buzzFun = function(n){ | |
if (n % 5 == 0) | |
return 'buzz'; |
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
function decamelcase(str){ | |
return str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); | |
} | |
Modernizr.prefixed('transform') |
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
<VirtualHost *:80> | |
DocumentRoot "/Users/sandropaganotti/Sites/hyphen-wp" | |
ServerName www.hyphen-italia.lan | |
ServerAlias hyphen-italia.lan | |
ServerAlias hsl360.lan | |
ServerAlias www.hsl360.lan | |
ServerAlias www.hyphen-book.lan | |
ServerAlias hyphen-book.lan | |
</VirtualHost> |
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
<?php | |
/* -- suppose you want to add a new colorpicker field type -- */ | |
add_action( 'init', 'boot_colorpicker' ); | |
/* -- first we create a file in the 'fields' directory of the plugin to notify Types of this new type -- */ | |
function boot_colorpicker(){ | |
$colorpicker_path = WPCF_EMBEDDED_INC_ABSPATH . '/fields/colorpicker.php'; | |
if( !file_exists($colorpicker_path) ){ | |
file_put_contents($colorpicker_path, "<?php // automatically generated \n ?>"); |
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
/* | |
To use it: | |
require(['video'], function(Video){ | |
var video = new Video('.video'); | |
// optionally, you can either drag a video file over the .video element | |
video.playvideo('a valid video url'); | |
}); | |
*/ |
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
# more info and usage here: | |
# http://sandropaganotti.com/2012/10/28/migrating-a-single-site-of-a-wordpress-multisite-instance/ | |
require 'yaml' | |
require 'ostruct' | |
require 'mysql2' | |
require 'php_serialize' | |
namespace :util do | |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>Edit - Il Blog di HTML.it</title> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<link rel="stylesheet" href="css/default.css" type="text/css"> | |
<![endif]--> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css" type="text/css"> |
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
<!DOCTYPE web-app PUBLIC | |
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" | |
"http://java.sun.com/dtd/web-app_2_3.dtd"> | |
<web-app> | |
<context-param> | |
<param-name>public.root</param-name> | |
<param-value>/</param-value> | |
</context-param> |
NewerOlder