Skip to content

Instantly share code, notes, and snippets.

@setola
setola / popover.html
Created March 26, 2014 10:06
How to add a close button to the Twitter Bootstrap Popover feature
<a
id="children-age-toggler"
data-target-selector="#children-age"
data-placement="bottom"
href="javascript:;"
class="children-age popover-children"
data-title="Children's Age"
></a>
<div id="children-age" class="hidden">
<p>Please select your children's Age</p>
@setola
setola / wp-config.php
Last active June 27, 2016 14:44
WordPress - Enable custom repository from local ip
<?php
/** Enable my local themes and plugins repository FFS!!! */
add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 );
function allow_my_custom_host( $allow, $host, $url ) {
if ( $host == 'put.your-repository-domain-here.com' )
$allow = true;
return $allow;
}
int pulPin = 10;
int dirPin = 11;
int enblPin = 12;
int ledPin = 13;
int loops = 0;
void setup() {
// put your setup code here, to run once:
pinMode(pulPin, OUTPUT);
@setola
setola / ipfilter.apacheconf
Last active December 12, 2015 07:48
PHPMyAdmin safe config on Ubuntu Server
<Directory /usr/share/phpmyadmin>
Order allow,deny
Allow from 192.168.1.0/24
</Directory>
@setola
setola / buildpath.xml
Created October 14, 2012 13:48
WordPress Eclipse Code Completion
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
<buildpathentry external="true" kind="lib" path="C:/Program Files/eclipse/workspaces/webdev/WordPress/wordpress-3.4.2"/>
</buildpath>
@setola
setola / functions.php
Last active September 25, 2020 18:29 — forked from johnmegahan/functions.php
Extended Walker class for use with the Twitter Bootstrap toolkit Dropdown n-levels menus in Wordpress.
<?php
/**
* Extended Walker class for use with the
* Twitter Bootstrap toolkit Dropdown menus in Wordpress.
* Edited to support n-levels submenu.
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640
* @license CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
*/
class BootstrapNavMenuWalker extends Walker_Nav_Menu {
@setola
setola / function.php
Created August 2, 2012 10:17
Wordpress - excerpt with wysiwyg editor
<?php
/**
* This class removes the default excerpt metabox
* and adds a new box with the wysiwyg editor capability
* @author etessore
*/
class TinyMceExcerptCustomization{
const textdomain = '';
const custom_exceprt_slug = '_custom-excerpt';
@setola
setola / app.js
Created July 25, 2012 15:22
jQuery Images Preload and Aspect Ratio Saver
jQuery(document).ready(function(){
jQuery('#slideshow').doSlideshow();
});
jQuery(window).resize(function(){
jQuery('#slideshow').imageResize();
});
jQuery.fn.doSlideshow = function() {
if (
@setola
setola / portfolio.php
Created July 9, 2012 16:15
Portfolio image list
<?php
/**
* Manage the portfolio feature
* @author etessore
*
*/
class portfolio{
const url_field_name = 'url';
const customer_box_id = 'customer-box';
const client_custom_post_name = 'clients';
@setola
setola / app.js
Created June 26, 2012 08:51
Font Size to fit container's witdh
jQuery(document).ready(function(){
jQuery('#container1 .auto-size').textAutoSize({
width: 249,
maxSize: 200,
minSize: 5,
//testEl: jQuery('#auto-size-test'),
mode: "ite-binary"
});
jQuery('#container2 .auto-size').textAutoSize({
maxSize: 100,