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
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" Allow backgrounding buffers without writing them, and remember marks/undo | |
" for backgrounded buffers | |
set hidden | |
" Remember more commands and search history |
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
# set a really simple PS1 | |
# will likly get overridden below | |
PS1='\[\e[1;31m\]\w\[\e[m\]\n\$ ' | |
# inclue megalodon stuff | |
if [ -f ~/.megalodon.profile ] ; then | |
source ~/.megalodon.profile | |
fi | |
# Load RVM into a shell session *as a function* |
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
$conf['memcache_options'] = array( | |
Memcached::OPT_COMPRESSION => TRUE, | |
); |
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
$the_cow = <<"EOC"; | |
$thoughts ..Z.. | |
$thoughts .7,#8 | |
$thoughts ...Z.=###.. | |
..=.=Z######Oo.. | |
..N. .~+###########~. | |
..8. ..~7##############8. | |
..?.. .~~##################D. | |
... ..+=#Z####################~. | |
? ....~=#########################8. |
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 | |
function grades_gsc_block_contents() { | |
include "grades.template.inc"; | |
global $user, $base_url; | |
drupal_add_js(drupal_get_path('module', 'ntlp_blocks') . '/grades.contents.js'); | |
$user_id = $user->uid; | |
if ($courseid == 0) { | |
//Getting Query String From URL |
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 | |
/** | |
* @file | |
* Add and Remove prefix commands. | |
* | |
* You can copy this file to any of the following | |
* 1. A .drush folder in your HOME folder. | |
* 2. Anywhere in a folder tree below an active module on your site. | |
* 3. /usr/share/drush/commands (configurable) |
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 | |
function example_menu() { | |
$items[] = array(); | |
$items['some/pointless/url'] = array( | |
'title' => t('Some Pointless Title'), | |
'page callback' => 'pointless_navigator', | |
'access arguments' => array('access content'), | |
'type' => MENU_CALLBACK, |
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
diff --git a/coder.drush.inc b/coder.drush.inc | |
index 47ab9bf..33b85d9 100644 | |
--- a/coder.drush.inc | |
+++ b/coder.drush.inc | |
@@ -53,6 +53,7 @@ function coder_drush_command() { | |
'security' => 'Drupal Security Checks', | |
'sql' => 'Drupal SQL Standards', | |
'style' => 'Drupal Coding Standards', | |
+ 'markdown' => 'Output in markdown', | |
), |
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
#!/bin/bash | |
for i in {`drush $1 pml --status=enabled -p | grep ntlp | cut -d " " -f 1`} | |
do | |
drush $1 coder critical $i > $i.md | |
done |
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
<p>This is a post I'm digging up from an old blog of mine, but refreshed. I needed to remove the table prefix from an existing Drupal site. The site had tables in the form of <code>drup_TABLENAME</code> and needed to be in the standard Drupal format as <code>TABLENAME</code>. I wrote a quick php script which can be called from Drush.</p> | |
<p>The script does not delete any existing tables unless needed, and but will drop a table by the same name (without the prefix) if it exists before trying to rename it. The database I was working in was pretty dirty and had a fresh install mixed amongst the prefixed tables.</p> | |
<p>I've tested it and run the against the site using the following steps:</p> | |
<ol> | |
<li><p>Run the file with drush</p> | |
<pre><code>drush php-script fix_prefix.php |