Skip to content

Instantly share code, notes, and snippets.

View unfulvio's full-sized avatar
🇹🇼

Fulvio Notarstefano unfulvio

🇹🇼
  • Taipei, Taiwan
View GitHub Profile
@unfulvio
unfulvio / disable-woothemes-updater-notice.php
Created April 13, 2016 21:35
Disable WooThemes Updater Notice
<?php
/*
* Plugin Name: Disable WooThemes Updater Notice
* Version: 1.0.0
* Plugin URI: https://github.com/unfulvio/
* Description: Disables the WooThemes Updater activation notice nag when the Updater is deactivated.
* Author: Fulvio Notarstefano
* Author URI: https://github.com/unfulvio/
* Requires at least: 4.0
* Tested up to: 4.5
@unfulvio
unfulvio / dt-toggle.js
Created June 17, 2013 14:33
Make every <dd> (definition description) element in a <dl> (definition llist) toggleable by the <dt> (definition term) element. Useful for creating toggleable lists, FAQs lists, etc.
$('#dl-container-id').on('click', 'dt.class-name', function() {
$(this).next().toggle();
});
@unfulvio
unfulvio / .htaccess
Created June 12, 2013 02:32
Protect a website folder (or root) with http password using .htaccess and .htpasswd
AuthUserFile /local/path/.htpasswd
AuthType Basic
AuthName "Insert a message here"
Require valid-user
@unfulvio
unfulvio / example.sh
Created June 19, 2015 11:05
Add all unversioned files to SVN
# See: http://stackoverflow.com/questions/1071857/how-do-i-svn-add-all-unversioned-files-to-svn
svn add --force * --auto-props --parents --depth infinity -q
@unfulvio
unfulvio / thinkpad.sh
Created May 30, 2015 14:11
Fix to re-enable Bluetooth on Thinkpad machines in Ubuntu in the event of a hardware hard off switch
echo options thinkpad_acpi dbg_bluetoothemul=1 bluetooth_state=1 | sudo tee -a /etc/modprobe.d/thinkpad_acpi.conf
@unfulvio
unfulvio / functions.php
Last active August 29, 2015 13:56
Just a self updating copyright year range
<?php
/**
* Copyright Years
* Outputs an years range based on specified year to current year
*
* @param int $copyYear - the year since the copyright starts (should be lower than current year)
* @return string - a range of years (eg. "2000-2010")
*/
function copyright( $copyYear ) {