- Download Angular lib from http://angularjs.org/ and place in your theme's js folder.
- Create a controller.js file in your theme's js folder.
- Place the controller code included in this gist.
- Include the angular lib and the controll file into your theme using the theme's .info file.
- Modify your html.tpl.php by including the
ng-appproperty to your<html>tag. - Modify your page.tpl.php by including the
ng-controller="TopPostCtrl"to your main<div>tag. - Check out the example page.tpl.php in this gist to see a simple example of iterating over our list.
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
| $ sudo npm install jitsu -g 1 ↵ ⚡(master*) | |
| Password: | |
| npm http GET https://registry.npmjs.org/jitsu | |
| npm http 200 https://registry.npmjs.org/jitsu | |
| npm http GET https://registry.npmjs.org/jitsu/-/jitsu-0.9.6.tgz | |
| npm http 200 https://registry.npmjs.org/jitsu/-/jitsu-0.9.6.tgz | |
| npm http GET https://registry.npmjs.org/complete/0.3.1 | |
| npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3 | |
| npm http GET https://registry.npmjs.org/colors/0.6.0-1 | |
| npm http GET https://registry.npmjs.org/flatiron-cli-config/0.1.3 |
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
| <a href="javascript:(function(){ul=jQuery('.yj-feed-messages');ul.children().each(function(i,li){ul.prepend(li)})})();">drag</a> |
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 | |
| $options['shell-aliases']['syncdb'] = '!drush --verbose --yes sql-sync --create-db @pac12.prod @self'; |
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
| <html> | |
| <body> | |
| <script> | |
| var D = document; | |
| var w = Math.max( | |
| Math.max(D.body.scrollWidth, D.documentElement.scrollWidth), | |
| Math.max(D.body.offsetWidth, D.documentElement.offsetWidth), | |
| Math.max(D.body.clientWidth, D.documentElement.clientWidth) | |
| ); |
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
| /** | |
| * This file contains breakpoints used for all browsers except IE7/8. | |
| */ | |
| @mixin breakpoint($point) { | |
| @if $point == tall { | |
| @media only screen and (min-width: 480px) { | |
| $zen-column-count: 1; | |
| $zen-gutter-width: 0; | |
| @content; | |
| } |
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 Crawler = require("simplecrawler").Crawler; | |
| // var myCrawler = new Crawler("jeradbitner.com"); | |
| var myCrawler = new Crawler("www.grammy.com"); | |
| // myCrawler.domain = "www.grammy.com"; | |
| myCrawler.supportedMimeTypes = [ | |
| /^text\//i | |
| ]; | |
| myCrawler.scanSubdomains = false; | |
| myCrawler.ignoreWWWDomain = true; | |
| // myCrawler.discoverResources = false; |
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
| // POST | |
| exports.addPost = function(req, res, next) { | |
| // the user's answer | |
| var theirCaptcha = req.body.captcha; | |
| if (!theirCaptcha) { | |
| return next("Missing captcha input"); | |
| } | |
| if (theirCaptcha == req.session.captcha) { | |
| // valid human | |
| delete req.session.captcha; |
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 path = require('path') | |
| , PATH_CONFIG = path.join(__dirname, '/source.json') | |
| , fs = require('fs') | |
| , source = JSON.parse(fs.readFileSync(PATH_CONFIG, "utf8")) | |
| , GitHubApi = require("github") | |
| , github = new GitHubApi({version: "3.0.0"}) | |
| , auth-user = "" | |
| , auth-pass = "" | |
| , user = 'otcshare' | |
| , repo = 'tizen.org' |
This document explains how we can use Jenkins to solve some SASS/Git headaches.
One of the problems that we deal with when working with SASS and Git is that the CSS added to the remote repository changes based on who compiled it. That means every time someone commits to the remote repository before we can push our work up, HEAD will have changed and our push attempt will be rejected.