Skip to content

Instantly share code, notes, and snippets.

View infininight's full-sized avatar

Michael Sheets infininight

View GitHub Profile
I am attesting that this GitHub handle infininight is linked to the Tezos account tz1Vhq5M4tGiRSy8kmqFa4nTsN3Gu9xSoFGY for tzprofiles
sig:edsigtuiCDPwLD9767iFTR4VwnBi4Dz3DuCWXJZ1yVa81YjHuVEy21PtkcecJkK7ujupjmAxU87bKW8RcDzqhpVv9EHYtevcEro
#!/bin/bash
echo -n "GitHub User: "
read USER
echo -n "GitHub Password: "
read -s PASS
echo ""
echo -n "GitHub Repo (e.g. foo/bar): "
@infininight
infininight / gist:b03b1354ae402f6170814af88efed26f
Created July 27, 2018 04:54
Sample extension grammar for HTML based template language (This is in bundle editor format, create a new grammar and paste in the contents.)
{ patterns = (
{ name = 'meta.tag.template.start.html';
begin = '(<)(s:[\-.0-9_a-zA-Z]*)(?=\s|/?>)';
end = '/?>';
beginCaptures = {
1 = { name = 'punctuation.definition.tag.begin.html'; };
2 = { name = 'entity.name.tag.html'; };
};
endCaptures = { 0 = { name = 'punctuation.definition.tag.end.html'; }; };
patterns = ( { include = 'text.html.basic#attribute'; } );
@infininight
infininight / gist:df61127de1c4be5502b38aa177c378c3
Created July 27, 2018 04:52
Sample extension grammar for HTML based template language
{ patterns = (
{ name = 'meta.tag.template.start.html';
begin = '(<)(s:[\-.0-9_a-zA-Z]*)(?=\s|/?>)';
end = '/?>';
beginCaptures = {
1 = { name = 'punctuation.definition.tag.begin.html'; };
2 = { name = 'entity.name.tag.html'; };
};
endCaptures = { 0 = { name = 'punctuation.definition.tag.end.html'; }; };
patterns = ( { include = 'text.html.basic#attribute'; } );

Punctuation Scopes

Note: For the punctuation that are used in pairs there is an optional .begin & .end that can be tacked on right before the language name at the end. They are not required to be used but should be standardized where found useful.

The third level of the following scopes is open to new scopes as you see fit, however try to keep then as generic as possible to keep the total number down. Try to reuse a scope if possible before creating anew.

  • punctuation.definition

    Punctuation that is intended to delimit the bounds of a single item, generally something that will become a real singular object in compiled/interpreted code. Can also be used in markup languages for delimiters that define small conceptual units (headers, list items, etc).

@infininight
infininight / running.applescript
Created May 18, 2016 02:38
Refresh Running Browser(s)
if application "Safari" is running then
tell application "Safari"
do JavaScript "window.location.reload();" in first document
end tell
end if
try
tell application "Finder"
name of application file id "com.google.Chrome"
end tell
@infininight
infininight / Language Grammars
Created September 3, 2012 04:32
Bundle Ordering
injections
patterns
repository
name
comment
disabled
match
begin
while
@infininight
infininight / gist:3524856
Created August 30, 2012 09:33
Grammar Ordering
injections
patterns
repository
name
comment
disabled
match
begin
end
@infininight
infininight / textmate_2_alpha.mdown
Created December 13, 2011 18:25
TextMate 2.0 Alpha

The excitement for a new version has been tremendous and today we’re finally able to repay the much appreciated loyalty and moral support from the community by releasing the first public alpha: TextMate 2.0 alpha (r8930).

It’s important to stress though that being an alpha release; it is not complete. It has reached a point where it may suit some early adopters and provide some relief to those who have been questioning TextMate’s future. For the time being, the alpha builds are only for people who already have a TextMate license and an Intel Mac.

Being a complete rewrite there are too many changes to sum up but here is an overview of notable changes since TextMate 1.5.10.

There are also many things that didn’t make it to this alpha, far too many to mention all of them, but a few deserves to be mentioned as they are likely to come up a lot in the coming days:

  • Split views: Yes, I actually had this on the alpha mile
@infininight
infininight / changes.mdown
Created December 13, 2011 18:20
Release Notes

Release Notes

Notable changes since TextMate 1.5.10:

  • Multiple carets / discontinuous selection

    The easiest way to get multiple carets is by doing a left or right movement command (like arrow left/right) with a column selection. You can also ⌘-click to place new carets or use Edit → Find All (⌥⌘F).

  • Snippets