I hereby claim:
- I am froboy on github.
- I am froboy (https://keybase.io/froboy) on keybase.
- I have a public key whose fingerprint is 28B1 F319 482F 148B 3385 6785 4998 8F44 9B45 9225
To claim this, I am signing this object:
$bad_tid = 0; // Enter the term id you wish to remove | |
foreach($entity->field_tags['und'] as $key => $term) { | |
if($term['tid'] == $bad_tid) unset ($entity->field_tags['und'][$key]); | |
} | |
node_save($entity); |
I hereby claim:
To claim this, I am signing this object:
// Once you have a SASS project set up, include this file | |
// with '@import “_colors.scss”;' and then use the variables | |
// in your SCSS files like 'a { color: $maroon; }'. | |
//primary color palette | |
$maroon: #800000; | |
$darkgray: #767676; | |
$lightgray: #D6D6CE; | |
//secondary color palette |
TOKEN=obfuscation | |
SLACK_WEBHOOK_URL=https://yoursite.slack.com/services/hooks/incoming-webhook?token=$TOKEN | |
CLOUD_SITE=1234567 |
How to clear caches in major browsers: | |
- Firefox: https://support.mozilla.org/en-US/kb/how-clear-firefox-cache | |
- Google Chrome: https://support.google.com/chrome/answer/95582?hl=en | |
- Safari: https://support.apple.com/kb/PH21412?viewlocale=en_US&locale=en_US | |
- Microsoft Internet Explorer (Windows 9 or lower): http://windows.microsoft.com/en-us/windows7/how-to-delete-your-browsing-history-in-internet-explorer-9 | |
- Microsoft Edge (Windows 10): http://windows.microsoft.com/en-us/windows-10/view-delete-browsing-history-microsoft-edge | |
- Opera: http://help.opera.com/Windows/12.10/en/cache.html |
// Before you can do this, get http://brew.sh/ | |
// Then get wget: brew install wget | |
// | |
// Grab an entire static archive of a site. (This might take a while) | |
wget -mkEpnp http://sitename.com |
test |
// This script can be run via Views Bulk Operations in the "Execute arbitrary PHP code" op | |
// This is, obviously, at your own risk. I'd take a db backup first. | |
// Force "Generate alias automatically" to be TRUE, then save the node. | |
$entity->path['pathauto'] = TRUE; | |
node_save($entity); | |
// Remove any stray redirects so that there's one true URL | |
$deleted = db_delete('redirect') | |
->condition('redirect', 'node/' . $entity->nid) | |
->execute(); |
###### | |
# This script intentionally deletes a lot of things that could be important!!!!! | |
# Please be sure you have a backup before you go nucular!!!!! | |
##### | |
# Depending on where your web root is... | |
rm -rf vendor/ && rm -rf web/core && rm -rf web/modules/contrib/ && rm -rf composer.lock | |
# or | |
rm -rf vendor/ && rm -rf docroot/core && rm -rf docroot/modules/contrib/ && rm -rf composer.lock |
<?php | |
$sites['somecustomsitename.com'] = 'somecustomsite.com'; | |
if (strpos($_SERVER['HTTP_HOST'], "-ra") != FALSE) // somesite-ra.com | |
{ | |
$sites[$_SERVER['HTTP_HOST']] = // Cut out -ra and rewrite to somesite.com | |
str_replace("-ra", "", $_SERVER['HTTP_HOST']); | |
} |