Skip to content

Instantly share code, notes, and snippets.

View alexisbellido's full-sized avatar

Alexis Bellido alexisbellido

View GitHub Profile
@alexisbellido
alexisbellido / .vimrc
Created October 23, 2015 15:24
My .vimrc to alternate between WordPress, Drupal, HTML and Javascript coding (always work in progress)
"set shiftwidth=2
"set expandtab
set nowrapscan
set autoindent
set smarttab
" Wordpress
" set autoindent
" set cindent
" "set shiftwidth=8
Notice: Undefined variable: month in include() (line 104 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined variable: day in include() (line 105 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined variable: start_time in include() (line 172 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined property: stdClass::$field_track_author in _vance_omniture_footer_js() (line 144 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
Notice: Undefined property: stdClass::$field_author_override in _vance_omniture_footer_js() (line 145 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
Notice: Undefined property: stdClass::$field_author in _vance_omniture_footer_js() (line 147 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
Notice: Undefined variable: month in include() (line 104 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined variable: day in include() (line 105 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined variable: start_time in include() (line 172 of /var/www/dev-vance.alley.ws/sites/all/themes/vance/templates/node--event.tpl.php).
Notice: Undefined property: stdClass::$field_track_author in _vance_omniture_footer_js() (line 144 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
Notice: Undefined property: stdClass::$field_author_override in _vance_omniture_footer_js() (line 145 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
Notice: Undefined property: stdClass::$field_author in _vance_omniture_footer_js() (line 147 of /var/www/dev-vance.alley.ws/sites/all/modules/custom/vance_omniture/vance_omniture.module).
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-m", "--meal", dest="meal", type="float", help="meal cost")
parser.add_option("-t", "--taxrate", dest="tax_rate",
type="float", help="tax rate")
From e1253d6e9bee364c6ee3a5ce8a8a1c5354beee1b Mon Sep 17 00:00:00 2001
From: Alexis Bellido <[email protected]>
Date: Tue, 10 Sep 2013 14:56:56 +0000
Subject: [PATCH] Check for node object before comparing nid with q parameter
---
sites/all/themes/tnr/templates/page.tpl.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sites/all/themes/tnr/templates/page.tpl.php b/sites/all/themes/tnr/templates/page.tpl.php
if (drupal_is_front_page()) {
$canonical_url = $base_url . '/';
<section class="ad-atf"><div id="ad-atf">
<script type="text/javascript">
if (GlamIsAvailable('ad-atf')) {
GlamShow('ad-atf');
} else {
googletag.cmd.push(function() { googletag.display('ad-atf'); });
}
</script>
</div></section>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
GlamCreateSlot("281100876", "728x90", "ad-leaderboard");
GlamCreateSlot("281100876", "300x250", "ad-atf");
GlamCreateSlot("281100876", "970x66", "ad-pushdown");
GlamGetAds("281100876");
//--><!]]>
</script>
googletag.cmd.push(function() {
googletag.defineSlot('/7181/blogs/blog_celeblove', [[728, 90], [320, 50]], 'ad-leaderboard').addService(googletag.pubads()).setTargeting("nid", "174371").setTargeting("type", "blog").setTargeting("name-url", "2013174371/five-things-you-must-know-sundays-downton-abbey-finale");
;
googletag.defineSlot('/7181/blogs/blog_celeblove', [[300, 250], [300, 600]], 'ad-atf').addService(googletag.pubads()).setTargeting("nid", "174371").setTargeting("type", "blog").setTargeting("name-url", "2013174371/five-things-you-must-know-sundays-downton-abbey-finale");
googletag.defineSlot('/7181/blogs/blog_celeblove', [160, 600], 'ad-skyscraper').addService(googletag.pubads()).setTargeting("nid", "174371").setTargeting("type", "blog").setTargeting("name-url", "2013174371/five-things-you-must-know-sundays-downton-abbey-finale");
googletag.defineSlot('/7181/blogs/blog_celeblove', [300, 100], 'ad-incontent').addService(googletag.pubads()).setTargeting("nid", "174371").setTargeting("type", "blog").setTa
@alexisbellido
alexisbellido / gist:4945125
Created February 13, 2013 14:55
Create this in ~/dev_run-x_YourTango_SecretWeapon_development and chmod u+x. Replace
#!/bin/bash -e
PROJECTDIR=/home/alexis/yourtango_secret_weapon_development
PROJECTENV=/home/alexis/.virtualenvs/x_YourTango_SecretWeapon_development
source $PROJECTENV/bin/activate
cd $PROJECTDIR
export LC_ALL="en_US.UTF-8"
export YTSW_DATABASES_DEFAULT_NAME_DEVELOPMENT="db_name"