This file contains hidden or 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
<html> | |
<head> | |
<title>Weeks Elapsed</title> | |
</head> | |
<body> | |
<div id="container" style="width:100%; height:50px; border:1px solid black;"> | |
<div id="progress-bar" style="width:50%; | |
background-color:black; | |
height:50px;"> | |
</div> |
This file contains hidden or 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
wget --mirror --page-requisites --adjust-extension --convert-links -e robots=off --accept-regex '.*(section|/sites/default/files).*' --directory-prefix=section http://www.example.com/section |
This file contains hidden or 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 | |
//Enter the taxonomy term ID you want to delete | |
$termid = -1; | |
$allterms = taxonomy_get_children($termid); | |
$allterms[] = $termid; | |
echo "Deleting $termid and its children\n"; | |
echo "Deleting " . count($allterms) . " terms\n"; |
This file contains hidden or 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
.item { | |
width: 200px; | |
} | |
.top { | |
margin-bottom: -8px; | |
text-align: center; | |
} | |
.borders { | |
border-bottom: black solid 1px; | |
border-left: black solid 1px; |
This file contains hidden or 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
INSERT INTO cas_user (uid, cas_name) | |
SELECT u.uid AS uid, u.name as cas_name | |
FROM users u | |
WHERE uid <> 0 AND | |
NOT EXISTS (SELECT cas_name FROM cas_user c WHERE c.cas_name = u.name) AND | |
u.name NOT LIKE "L0%"; |
This file contains hidden or 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
update users set name='username' where uid=user-id; | |
insert into cas_user (uid, cas_name) values (user-id, 'username'); |
This file contains hidden or 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
# users without any recent edits | |
select u.name, u.mail, n1.uid, n1.vid, n1.nid, from_unixtime(n1.timestamp) changed | |
from node_revision n1, users u | |
where n1.uid = u.uid | |
and timestamp= | |
(select max(timestamp) | |
from node_revision n2 | |
where n2.uid=n1.uid) # this selects the most recent revision for each person | |
and from_unixtime(n1.timestamp) < date_sub(now(), interval 30 day) | |
and u.status = 1 # ignore people who are blocked |
This file contains hidden or 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/python | |
import MySQLdb | |
import smtplib | |
import re | |
import os | |
# list of users to exclude by usernames | |
exclusions = [] | |
# DB stuff |
This file contains hidden or 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 | |
define('DRUPAL_ROOT', $_SERVER['DOCUMENT_ROOT']); | |
$base_url = 'http://'.$_SERVER['HTTP_HOST']; | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); | |
global $user; | |
if (!in_array('administrator', array_values($user->roles)) && !in_array('Admin Lite', array_values($user->roles))) { | |
echo "You do not have sufficient permissions to view this page. <a href='/user'>Log in</a>, or verify that you have an administrative role"; | |
die(); |
This file contains hidden or 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
<script type='text/javascript'> | |
var link = !!document.querySelector("link[rel='canonical']") ? document.querySelector("link[rel='canonical']") : document.createElement('link'); | |
link.setAttribute('rel', 'canonical'); | |
link.setAttribute('href', location.protocol + '//' + location.host + location.pathname); | |
document.head.appendChild(link); | |
</script> |
OlderNewer