View scripts.js
This file contains 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
/** | |
* jQuery.browser.mobile (http://detectmobilebrowser.com/) | |
* | |
* jQuery.browser.mobile will be true if the browser is a mobile device | |
* | |
**/ | |
(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i| |
View affix.css.scss
This file contains 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
@media (max-width: 768px) { | |
.affix { | |
position: static; | |
} | |
} |
View .gitignore
This file contains 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
# Ignore docs files | |
styles/.sass-cache | |
styles/.sass-cache/* | |
# Not working? | |
# Try: http://stackoverflow.com/questions/11451535/gitignore-not-working | |
# Try: http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring |
View MySQL
This file contains 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 node SET comment = 2 WHERE type = 'foo' | |
UPDATE node_revision SET comment = 2 WHERE nid IN (SELECT nid FROM node WHERE type = 'foo') | |
//'foo' = the machine name of your content type |
View yourmodule.module
This file contains 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 yourmodule_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'comment_node_blog_post_form') { | |
$form['actions']['submit']['#value'] = 'Add Your Comment'; | |
$form['#action'] = '?'. drupal_get_destination(); | |
} | |
} |
View gist:8963231
This file contains 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
Sub MyAdd(ByVal strTableName As String, ByRef arrData As Variant) | |
Dim Tbl As ListObject | |
Dim NewRow As ListRow | |
Set Tbl = Worksheets("Cart Conversion").ListObjects(strTableName) | |
Set NewRow = Tbl.ListRows.Add(AlwaysInsert:=True) | |
' Handle Arrays and Ranges | |
If TypeName(arrData) = "Range" Then | |
NewRow.Range = arrData.Value |
View rails.html.erb
This file contains 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
<% 10.times { -%> | |
<%= render :partial => '/prototype/partials/story-list/story_list_filler' %> | |
<% } -%> |
View pagetpl.php
This file contains 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 | |
$front_page = node_load("111"); | |
$page_intro = field_view_field('node',$front_page,'field_page_intro'); | |
print render($page_intro); | |
?> |
View pagetpl.php
This file contains 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 | |
$front_page = node_load("1"); | |
foreach ($front_page->field_slideshow_images['und'] as $key => $value) { | |
$slide = entity_load('field_collection_item', array($value['value'])); | |
$idx = $value['value']; | |
?> | |
<div class="rsContent slide"> | |
<img src="<?php print image_style_url('none', $slide[$idx]->field_image['und']['0']['uri']); ?>" class="rsImg"> | |
<div class="projectInfo"> | |
<p><?php print $slide[$idx]->field_title_of_project['und']['0']['value']; ?></p> |
View overrides.scss
This file contains 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
/*-------------------------------------------------------------------------------*/ | |
/* GLOBAL / DRUPAL OVERRIDES */ | |
/*-------------------------------------------------------------------------------*/ | |
html { | |
background: #fff; | |
} | |
body { | |
background: #fff; | |
color: #111011; |
NewerOlder