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 | |
| $module = "boxes"; // this is the name of whatever module actually creates the block, I so happen to love boxes. | |
| $delta = "video_homepage_footer"; // this is the machine name of the block (or in this case box) | |
| $block = (object) module_invoke($module, 'block', 'view', $delta); | |
| $block->module = $module; | |
| $block->delta = $delta; | |
| print theme('block', $block); |
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
| body, | |
| div.page-content.two-column-layout, | |
| div.page-content.three-column-layout { | |
| background: none !important; | |
| } | |
| .two-column-layout #column-two { | |
| margin-top: 0px !important; | |
| padding-top: 0px !important; | |
| } |
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
| ########### | |
| ## Blogging | |
| function new_post { | |
| cd /Users/sirkitree/github/octopress | |
| rake new_post["$1"] | |
| } | |
| alias blog="new_post" |
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
| var fs = require('fs'); | |
| var path = require('path'); | |
| ... | |
| var file = path.join(__dirname, '..', 'tmp', 'todo.txt'); | |
| ... | |
| describe('.export()', function(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
| /** | |
| * Implementation of hook_block(). | |
| */ | |
| function twitfaves_block($op = 'list', $delta = 0, $edit = array()) { | |
| switch ($op) { | |
| ... | |
| case 'view': | |
| $screen_name = variable_get('twitfaves_screen_name', 'lullabot'); | |
| $count = variable_get('twitfaves_count', 3); | |
| if ($tweets = twitfaves_generate($screen_name, $count)) { |
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
| article.article-teaser .article-content { | |
| min-height: 350px; | |
| } | |
| article.article-teaser .article-content p img { | |
| width: 75px; | |
| float: right; | |
| } | |
| article.article-teaser .article-content .field-item>p:nth-of-type(2) img { | |
| width: 200px; |
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
| // Project Euler challenge #1 | |
| // https://projecteuler.net/problem=1 | |
| var total = 0, | |
| i = 1000; | |
| while (i--) { | |
| if (i % 3 === 0 || i % 5 === 0) { | |
| total += i; | |
| } | |
| } |
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
| // Project Euler challenge #2 | |
| // https://projecteuler.net/problem=2 | |
| var a = 1, b = 2, sum = 0; | |
| while (a < 4000000) { | |
| if (a % 2 == 0) sum += a; | |
| var tmp = a; | |
| a = b; | |
| b += tmp; | |
| } |
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 prime factors of 13195 are 5, 7, 13 and 29. | |
| What is the largest prime factor of the number 600851475143 ? | |
| --]] | |
| function get_all_factors(number) | |
| local factors = {} | |
| for possible_factor=1, math.sqrt(number), 1 do | |
| local remainder = number%possible_factor |
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
| drush site-install lagra -y | |
| drush upwd admin --password="admin" | |
| drush fra --force -y | |
| drush dis overlay -y | |
| drush cc all | |
| # Migrate taxonomy terms | |
| drush lmi tag | |
| drush lmi genre | |
| drush lmi award |