Skip to content

Instantly share code, notes, and snippets.

View jonathanmoore's full-sized avatar
🚀
Building for Shopify

Jonathan Moore jonathanmoore

🚀
Building for Shopify
View GitHub Profile
@jonathanmoore
jonathanmoore / git-combine.md
Created January 28, 2014 21:53
Combining Repos

Steps to Combine Git Repos w/ Perserving History

# Add a remote for and fetch the old repo
git remote add -f theme_name <theme_name repo URL>

# Merge the files from theme_name/master into new/master
git merge theme_name/master

# Move the old_a repo files and folders into a subdirectory so they don't collide with the other repo coming later
<script src="http://platform.tumblr.com/v1/share.js"></script>
<!-- Containers -->
<p id="tumbr_video_share"></p>
<p id="tumbr_text_share"></p>
<!-- Everlapse Vars -->
<script type="text/javascript">
var everlapse_title = 'Walk With Me';
@jonathanmoore
jonathanmoore / Switch to Github
Created March 4, 2013 19:38
A useful set of commands to switch over to Github as a new remote.
git remote rm origin
git remote add origin git@github.com:user/repo.git
git push -u origin master
git push --all
git push --tags
@jonathanmoore
jonathanmoore / Gruntfile.js
Last active December 14, 2015 08:49
A sample Grunt file to jshint, uglify, watch (regarde), connect a local server, and live reload the files.
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function(grunt) {
@jonathanmoore
jonathanmoore / gulp-build-branch.js
Created June 13, 2014 21:00
Gulp Task for building to a new branch
gulp.task 'deploy', shell.task [
'git checkout master'
'git branch -D dist'
'git stash'
'git checkout -b dist'
'rm .gitignore'
'git add .gitignore --all'
'gulp build',
'git add public'
'git commit -m "build for release"'
@jonathanmoore
jonathanmoore / README.mkd
Created November 8, 2012 07:55 — forked from christophermanning/README.md
Voronoi Diagram with Force Directed Nodes and Delaunay Links

Created by Christopher Manning

Summary

Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.

Controls

  • Drag the nodes to interact with the diagram.
  • Use the mousewheel to add/remove nodes.
@jonathanmoore
jonathanmoore / pinterest.js
Created March 26, 2012 23:21 — forked from 65/pinterest.js
pinterest buttons on every image in a blog post using jquery
$().ready(function() {
$('.entry-body img').each(function(){
var $permalink = $(this).parents('.entry').find('.permalink').attr('href');
$(this).wrap('<div class="pinme" style="' + $(this).attr('style') + '" />').after('<a href="http://pinterest.com/pin/create/button/?url=' + $permalink + '&media=' + $(this).attr('src') + '&description=' + $(this).attr('alt') + '" class="pin-it-button" count-layout="vertical">Pin It</a>');
});
$('.pinme').hover(function() {
$(this).children('iframe').css('display','block');
}, function() {
$(this).children('iframe').css('display','none');
@jonathanmoore
jonathanmoore / gist:1473089
Created December 13, 2011 17:45
Tumblr <embed> striping
<!-- Embed code for Mixcloud -->
<object width="480" height="480">
<param name="movie" value="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2Fvlekrecords%2Fssaliva-lrzpm%2F&embed_uuid=ae879085-19b7-4e66-86b0-9e2e50835c9d&stylecolor=&embed_type=widget_standard"></param>
<param name="allowFullScreen" value="true"></param>
<param name="wmode" value="opaque"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2Fvlekrecords%2Fssaliva-lrzpm%2F&embed_uuid=ae879085-19b7-4e66-86b0-9e2e50835c9d&stylecolor=&embed_type=widget_standard" type="application/x-shockwave-flash" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" width="480" height="480"></embed>
</object>
<!-- Embed code after Tumblr strips the <embed> tag -->
<section class="ad">
<object height="260" width="100%"><param name="wmode" value="transparent"><param name="movie" value="http://widget.gigatools.com/GigaToolsWidget.swf?user=benjiboko&font=default&ca=0&cb=33ff00&cc=ffffff"></param>; <param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" wmode="transparent" height="260" src="http://widget.gigatools.com/GigaToolsWidget.swf?user=benjiboko&font=default&ca=0&cb=33ff00&cc=ffffff"; type="application/x-shockwave-flash" width="100%"></embed></object>
</section>
@jonathanmoore
jonathanmoore / disqus-comment-count
Created November 18, 2011 17:08
Updated Disqus comment count
{block:IfDisqusUsername}
<script type="text/javascript">
var disqus_shortname = '{text:Disqus Username}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>