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
| NSInteger count = [timelineData count]; | |
| for (NSInteger index = (count - 1); index >= 0; index--) { | |
| NSMutableDictionary *tweet = timelineData[index]; | |
| if (tweet[@"retweeted_status"]) { | |
| [timelineData removeObjectAtIndex:index]; | |
| } else { | |
| NSMutableDictionary *userObject = [tweet[@"user"] mutableCopy]; | |
| int fav_count = tweet[@"favorite_count"]; | |
| int rt_count = tweet[@"retweet_count"]; | |
| int follower_count = userObject[@"followers_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
| var gulp = require('gulp'); | |
| var source = require('vinyl-source-stream'); | |
| var watchify = require('watchify'); | |
| var livereload = require('gulp-livereload'); | |
| var hbsfy = require("hbsfy").configure({ | |
| extensions: ["html"] | |
| }); | |
| gulp.task('watch', 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| data:text/html,<div class="wrap"> <h1>Todo<span>, no fuss lists</span></h1> <input placeholder="Add a todo" type="text" id="item" /> <button id="go">Save</button> <span class="help">* tap to delete</span> <ul id="tudu_list"> </ul> </div><script type="text/javascript">var tudu_list = document.getElementById('tudu_list'); var item = document.getElementById('item'); var new_li; var new_obj = {}; function prependElement(parentID,child) { parent=parentID; parent.insertBefore(child,parent.childNodes[0]); } function remove(element){ element.parentNode.removeChild(element); } function deleteItem(){ var answer = confirm('Sure you want to remove this?'); if(answer){ var deleteId = this.getAttribute('rel'); remove(this); } } function addItem(){ if(item.value !== ''){ new_li = document.createElement('li'); new_li.innerHTML = item.value; prependElement(tudu_list, new_li); new_li.onclick = deleteItem; item.value = ''; } } function callAdd(e){ if(event.keyCode == 13){ addItem(); } } item.onkeyup = function(e){ callAdd(e) }; |
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 activeElement = document.activeElement; | |
| if(activeElement){ | |
| activeElement.blur(); | |
| } |
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
| // checks screen size | |
| var isMobile = { | |
| any: function() { | |
| return($(window).width()<=599); | |
| // nexus7 width is 600 (window.innerWidth) | |
| // this will not run any reformatting for the phone layout on nexus | |
| } | |
| }; |
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 forceReflow = function(el) { | |
| el = el || document.body; | |
| el.style.position = 'static'; | |
| setTimeout(function() { | |
| el.style.position = 'relative'; | |
| }, 0); | |
| } |
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 a=document.links;i=0;for(l=a.length;i<l;i++){var b=new Image;b.src=a[i].href;a[i].insertBefore(b)}; |
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
| <ul class={{#oneOrMany posts}}{{/oneOrMany}}> | |
| {{#each posts}} | |
| <li>{{content}}</li> | |
| {{/each}} | |
| </ul> |
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
| So, I create a gh-pages on my main account: benhowdle89.github.com repo and | |
| point my domain at it http://benhowdle.im. I then create gh-pages in one of | |
| my repos: so, http://benhowdle.im/svgeezy will point at my repo | |
| benhowdle.github.com/svgeezy. That's all good. | |
| HOWEVER. | |
| What would happen if I create a folder in my jekyll site at the root, | |
| ie. in benhowdle.github.com called "svgeezy"? |