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
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c | |
index f6d4d03..19e0f01 100644 | |
--- a/src/libwaitress/waitress.c | |
+++ b/src/libwaitress/waitress.c | |
@@ -1058,8 +1058,8 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *waith) { | |
/* certificate verification function */ | |
gnutls_session_set_ptr (waith->request.tlsSession, | |
(gnutls_transport_ptr_t) waith); | |
- gnutls_certificate_set_verify_function (waith->tlsCred, | |
- WaitressTlsVerify); |
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
global $user; | |
/* | |
* If the user is not logged in, require them to login prior to being | |
* redirected to the form | |
*/ | |
if ($user->uid === 0 && arg(0) != 'user') { | |
$dest = drupal_get_path_alias($_GET['q']); | |
drupal_goto('user', array('query' => array('destination' => $dest))); | |
} |
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
#!/bin/sh | |
PERM_USER=nobody | |
PERM_GROUP=dev | |
APACHE_USER=apache | |
if [ $# -ne 1 ] ; then | |
echo "USAGE $0 <d7 root dir>" | |
exit; | |
fi |
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
#!/bin/bash | |
# Usage: | |
# ./download.sh allmodules.txt | |
# | |
# Assumes allmodules.txt is a newline-separated list of projects you want to | |
# download. | |
# @todo Error handling of any kind. :P I'm so optimistic. :P | |
# Versions to attempt to download, in order of preference. |
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
#!/usr/bin/env php | |
<?php | |
function create_link($msg) { | |
$pattern = array( | |
'/(((http|https|ftp|ftps)\:\/\/)(?:[\w\-\d]+\.)+[\w\-\d]+(?:\/[\w\-\d]+)*(?:\/|\.[\w\-\d]+)?(?:\?[\w\-\d]+\=[\w\-\d\+]+)?(?:\&[\w\-\d]+\=[\w\-\d\+\.\%]+)*(?:\#[\w\-\d]*)?)/', | |
); | |
$replace = array( | |
'<a href="$1">$1</a> [<a href="$1" target="_blank">^</a>]' , |
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
%s/\(\w\+\).\(\w\+\)@/\2.\1@/ | |
In vim, this will take a pattern such as [email protected] | |
and replace it with [email protected] |
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
#!/usr/bin/env drush | |
<?php | |
# | |
# This script removes all drupal users with uid > 1 (e.g., skips | |
# admin user) and reassigns their content to anonymous. | |
# | |
// check if we can bootstrap | |
$self = drush_sitealias_get_record('@self'); | |
if (empty($self)) { |
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
rs.repl_lag = function () { | |
var s = db._adminCommand("replSetGetStatus"); | |
// if this is primary, go no further. | |
if (s.myState == 1) { | |
return 0; | |
} | |
var mytime = 0; | |
var primarytime = 0; |
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
#!/usr/bin/env drush | |
<?php | |
/** | |
* This script removes all drupal users with no roles other than authenticated | |
* user assigned. | |
* | |
* This is useful in the case where a site's only users are admin or some | |
* other higher level role. | |
* | |
* Make sure to back up the database prior to running this as this cannot be |
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
#!/bin/bash | |
set -x | |
# This assumes that composer is already installed | |
sudo mkdir -p /usr/share/composer \ | |
&& sudo composer -vvv global require drush/drush:dev-master --working-dir=/usr/share/composer \ | |
&& sudo ln -s /usr/share/composer/vendor/drush/drush/drush /usr/local/bin/drush |
OlderNewer