Skip to content

Instantly share code, notes, and snippets.

Chris Chiera ChrisChiera

Block or report user

Report or block ChrisChiera

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ChrisChiera /
Created Feb 15, 2012
IP Restrict a Domain or Subdomain

IP Restrict a Domain or Subdomain

Create a .htaccess file. (they are hidden by default)

Add the following contents:

Deny from all Allow from

View youtube-custom-player
A while back YouTube quietly removed their Custom Channel Player, leaving users no way to automatically show their Channel in an embed other than manually curating a Playlist which was limited to a number of videos.
The Google Gadget option was limited in its inability to change width and height attributes.
The following code will now show a Custom Channel embed as expected:
<iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>
Replace ACCOUNT_NAME with your YouTube account.
ChrisChiera / delete_openwith_duplicates
Created Nov 13, 2012
Delete "Open With" Duplicate Entries on Mac
View delete_openwith_duplicates
LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\
-domain system -domain user
killall Finder
ChrisChiera / disable-wordpress-login
Created Aug 17, 2013
Disable WordPress User Login During Maintenance
View disable-wordpress-login
//Disables login for 'editor' and custom 'revisor' user roles.
function site_maintenance() {
if ( current_user_can('editor') || current_user_can('revisor') ) {
$logout_url = wp_login_url().'?mode=maintainance';
wp_redirect( $logout_url, 302 );
View new_gist_file.css
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
View add-class-on-scroll
jQuery(document).ready(function($) {
$(window).on('scroll touchmove', function () {
$('.main-navigation').toggleClass('past-main', $(document).scrollTop() > 0);
ChrisChiera / functions.php
Last active Aug 29, 2015 — forked from elimn/functions.php
MT | TEC | Change past event views to reverse chronological order
View functions.php
// Changes past event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {
$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'past') ? true : false;
if(tribe_is_past() || $past_ajax) {
$post_object = array_reverse($post_object);
You can’t perform that action at this time.