Skip to content

Instantly share code, notes, and snippets.

Bob Rockefeller bobrocke

Block or report user

Report or block bobrocke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bobrocke
bobrocke / BBEdit: Open iTerm2 Here.applescript
Last active Jul 8, 2016
An AppleScript to open iTerm2 at the file system location of the selected file or folder in BBEdit.
View BBEdit: Open iTerm2 Here.applescript
tell application "BBEdit" to set theFile to file of document 1
tell application "Finder" to set theFolder to (container of file theFile) as alias
set theUnixPath to POSIX path of theFolder
tell application "iTerm"
activate
tell current window
close
end tell
tell (create window with profile "Default")
@bobrocke
bobrocke / item.html.twig
Created Nov 29, 2015
Blog post template
View item.html.twig
<!-- /templates/item.html.twig -->
{% embed 'partials/base.html.twig' %}
{% set base_url = base_url_relative ~ site.blog.route %}
{% block content %}
<div class="article-block">
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false} %}
</div>
View base.html.twig
<!-- /templates/partials/base.html.twig -->
<!DOCTYPE html>
<html lang="en">
<head>
{% block head %}
<meta charset="utf-8" />
<title>{{ site.title }}{% if header.title %} - {{ header.title }}{% endif %}</title>
{% include 'partials/metadata.html.twig' %}
@bobrocke
bobrocke / gist:7ae20b962ba77d93d985
Last active Nov 15, 2015
TextMate Markdown insertion
View gist:7ae20b962ba77d93d985
{ patterns = (
{ name = 'source.yaml.front-matter';
begin = '\A-{3}';
end = '-{3}';
patterns = ( { include = 'source.yaml'; } );
},
{ name = 'text.html.markdown.classes';
begin = '\{';
end = '\}';
},
View untitled_74u.tmp
{ patterns = (
{ name = 'source.yaml.front-matter';
begin = '\A-{3}';
end = '-{3}';
patterns = ( { include = 'source.yaml'; } );
},
{ name = 'text.html.markdown.classes';
begin = '\)\{';
end = '\}';
},
View selection
{ patterns = (
{ name = 'source.yaml.front-matter';
begin = '\A-{3}';
end = '-{3}';
patterns = ( { include = 'source.yaml'; } );
},
{ name = 'text.html.markdown.classes';
begin = '\)\{';
end = '\}';
},
@bobrocke
bobrocke / snippet
Created May 26, 2015
Atom Command Registration
View snippet
activate: function(state) {
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(atom.commands.add('.platform-darwin .tree-view', {
'open-a-terminal:openroot': (function(_this) {
return function() {
return _this.openroot();
};
})(this)
}));
You can’t perform that action at this time.