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 field_config set type='text_long' where field_name='field_a' or field_name='field_b'; | |
alter table field_data_field_a modify field_a_value longtext; | |
alter table field_data_field_b modify field_b_value longtext; | |
alter table field_revision_field_a modify field_a_value longtext; | |
alter table field_revision_field_b modify field_b_value longtext; | |
# adjust 4096 to your length, and change s to match the number of characters in the length. | |
update field_config set data=replace(data, 'a:1:{s:10:"max_length";s:4:"4096";}', 'a:0:{}') where field_name='field_a' or field_name='field_b'; | |
update field_config_instance set data=replace(data,'s:14:"text_textfield";','s:13:"text_textarea";') where field_name='field_a' or field_name='field_b'; | |
# adjust 60 to the edit field length, and change s to match the number of characters in that field length | |
update field_config_instance set data=replace(data,'s:4:"size";s:2:"60";','s:4:"rows";s:1:"5";') where field_name='field_a' or field_name='field_b'; |
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 src="//static.lanecc.net/js/jquery-2.1.4.min.js"></script> |
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
<iframe src="https://www.lanecc.edu/custom/signvideo.php?player=laneccstream" width="600" height="350"></iframe> |
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> | |
setTimeout(function() { | |
$.urlParam = function(name, url) { | |
if (!url) { | |
url = window.location.href; | |
} | |
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url); | |
if (!results) { | |
return undefined; | |
} |
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
SELECT f.entity_id, | |
f.bundle, | |
Sum(f.counts) c | |
FROM (SELECT entity_id, | |
bundle, | |
Format((Length(body_value) - Length(REPLACE(body_value, ' ', ''))) / Length(' '), 0) AS counts | |
FROM field_data_body) AS f | |
GROUP BY f.entity_id | |
ORDER BY c ASC; |
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
SELECT c.count, | |
users.name | |
FROM (SELECT Count(*) count, | |
uid | |
FROM node_revision | |
WHERE From_unixtime(timestamp) > Date_sub(Curdate(), INTERVAL 2 month) | |
GROUP BY uid) c, | |
users | |
WHERE c.uid = users.uid | |
ORDER BY count; |
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
function makeNumbers(s){ | |
return parseInt(s.replace(/^\D+/g, "")); | |
} | |
if(jQuery(".wordlimit").length > 0){ | |
jQuery('.form-submit').prop('disabled', true); | |
jQuery('.wordlimit').before("<div class='wordcount-status'>Wordcount: <span class='wc-count'>0</span></div>"); | |
jQuery('.wordlimit').on('keyup blur', function(){ | |
var limits = jQuery(this).attr('class').match(/wordlimit-([0-9]+)/g); |
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> |
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
#!/usr/bin/python | |
import MySQLdb | |
import smtplib | |
import re | |
import os | |
# list of users to exclude by usernames | |
exclusions = [] | |
# DB stuff |
NewerOlder