Skip to content

Instantly share code, notes, and snippets.

View btopro's full-sized avatar
🃏
Seeking Ubiquity

Bryan Ollendyke btopro

🃏
Seeking Ubiquity
View GitHub Profile
// fetch the nodes somehow
foreach ($nodes as $node) {
$node->newfield = $node->oldfield
unset($node->oldfield);
node_save($node);
}
@btopro
btopro / gist:4f457016478b63ddaf77
Last active August 29, 2015 14:09
Drush Recipes Transform Work (ing with drupal)
# get the project!
drush dl drush_recipes && drush cc drush && drush cook dlr
# to list drush_recipes commands
drush help --filter=drush_recipes
# lets build a new site to play with
drush dl drupal
cd drupal-7.33
drush si minimal
@btopro
btopro / gist:eb05a9cdb381f6b98102
Created January 12, 2015 20:54
sublime user prefs
{
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Color Scheme - Default/Colorized-41242979103884-Monokai.tmTheme",
"default_line_ending": "unix",
"detect_slow_plugins": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"fallback_encoding": "UTF-8",
@btopro
btopro / gist:9e6cf90b73ba1a58c992
Last active January 19, 2019 16:51
ELMSLN Technical review
# all the students in all the courses
d @courses-all efq user user '[]' student --count --y
# all of the courses that are being publicly marketted
d @online efq node course '[{"condition":"fieldCondition","arguments":["field_display_in_course_list","value","1","="]}]' --count
# number of service_instances that are for the "course" service
d @online efq node service_instance '[{"condition":"propertyCondition","arguments":[ "title","%courses","LIKE"]}]' --count --format=json
@btopro
btopro / gist:7e7f6ee9cca8f6782513
Last active August 29, 2015 14:15
digital ocean environment testing
#!/bin/bash
# prep my digital ocean environment for testing... any elmsln stuff
apt-get install git -y
# then run
cp /var/www/html/drupal/sites/default/settings.php /var/www/html/settings.php
rm -rf /var/www/html/drupal
git clone https://github.com/btopro/elmsln.git
ln -s /var/www/html/elmsln/core/dslmcode/stacks/courses /var/www/html/drupal
# kill symlink for development
rm /var/www/html/drupal/sites/default
{
"name": "Drupal 7 Admin Page - Rubik",
"drush_recipes_api": "1.0",
"weight": "0",
"core": "7",
"recipe": [
{
"command": "pm-enable",
"arguments": [
"tao,rubik",
@btopro
btopro / gist:2bb6e23bb9aee986277f
Created April 1, 2015 15:55
legacy.. you'll see why this is here now
<ul class="accordion" data-accordion>
<li class="accordion-navigation">
<a href="#unit1">Unit 1</a>
<div id="unit1" class="content active">
<ul class="off-canvas-list content-outline-navigation expanded">
<h2>Lesson 1</h2>
<h3>Correspondence with Memory</h3><li><a href="/art010/node/81"><div class="icon-assignment-white outline-nav-icon" data-grunticon-embed=""></div>Textbook Readings</a></li><li class="has-submenu"><a href="#"><div class="icon-content-white outline-nav-icon" data-grunticon-embed=""></div><span class="outline-nav-text">Mail Art Overview</span></a>
<ul class="left-submenu level-1-sub">