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 throttle( fn, time ) { | |
var t = 0; | |
return function() { | |
var args = arguments, ctx = this; | |
clearTimeout(t); | |
t = setTimeout( function() { | |
fn.apply( ctx, args ); | |
}, time ); | |
}; |
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
/* | |
Copyright Vassilis Petroulias [DRDigit] | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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 httpRequest($req,$hash_config=NULL){ | |
$config = Obj2xml::getConfig($hash_config); | |
$ch = curl_init(); | |
if($config['proxy'] !== ''){ | |
curl_setopt($ch, CURLOPT_PROXY, $config['proxy']); | |
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true); | |
} | |
curl_setopt($ch, CURLOPT_POST, true); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml')); | |
curl_setopt($ch, CURLOPT_URL, $config['url']); |
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 | |
/* | |
* You could work this into your template to check if a user has access to a page/post before showing a link to it. | |
* Or you could wrap this in a function and hook into a wordpress filter like the_title, or the_excerpt | |
* | |
* | |
* First check that the class exists | |
* This should allow your site to fail gracefully if the plugin is removed | |
*/ | |
if(class_exists('agora_auth_container')){ |
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
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT='%{$fg_bold[white]%}%M %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
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
#-- Staging Server Password -------------------------# | |
SetEnvIf Host yourstagingserver.com passreq | |
AuthType Basic | |
AuthName "Staging Server" | |
AuthUserFile /home/username/.htpasswd | |
Require valid-user | |
Order allow,deny | |
Allow from all | |
Deny from env=passreq | |
Satisfy any |
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
# Enable programmable completion features. | |
if [ -f /etc/bash_completion ]; then | |
source /etc/bash_completion | |
fi | |
# Set the PS1 prompt (with colors). | |
# Based on http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/ | |
# And http://networking.ringofsaturn.com/Unix/Bash-prompts.php . | |
#PS1='\n[\u@\h \! \w]\n\[\e[32m\]$ \[\e[0m\]' | |
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 | |
// Grab the plugin global | |
global $agora_mw_auth_plugin; | |
// Remove the filter | |
remove_filter( 'the_content', array($agora_mw_auth_plugin, 'content_filter') ); | |
// Display the content, now without the filter running. | |
the_content(); |
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 | |
add_action('send_password_change_email', 'no_email_update'); | |
function no_email_update(){ | |
return false; | |
} |