Skip to content

Instantly share code, notes, and snippets.

View veganstraightedge's full-sized avatar
🐢
Computers were a mistake.

Shane Becker veganstraightedge

🐢
Computers were a mistake.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am veganstraightedge on github.
  • I am veganstraightedg (https://keybase.io/veganstraightedg) on keybase.
  • I have a public key ASBB7IIfEcbDfy9QB_pyTYjdo8j67iyG-C0kB6u7faqhjwo

To claim this, I am signing this object:

@veganstraightedge
veganstraightedge / regex-help.md
Last active February 12, 2017 11:01
I need help writing this regex. Maybe it's obvious to someone else, but I keep failing one while matching the other or vice versa.

I need help writing this regex. Maybe it's obvious to someone else, but I keep failing one while matching the other or vice versa.

In Ruby.

Here are the the three test cases that I need to meet.

[[https://example.com/photo.png]]
[[https://example.com/video.mp4 With a text caption that's always separated from the URL by at least one space.]]
[[https://example.com/photo.png]] [[https://example.com/photo.png]]

This is all based on the [alpha release][1].

Properties

From the built-in help system:

For many settings TextMate will look for a .tm_properties file in the current folder and in any parent folders (up to the user’s home folder).

These are simple setting = value listings where the value is a format string in which other variables can be referenced.

@veganstraightedge
veganstraightedge / readline-fix-macos-sierra
Created December 22, 2016 03:01
Ruby (Rails console, etc) needs Readline 6 instead of Readline 7.
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><h2>Tests for common HTML elements</h2>
<hr>
<p><b>PARAGRAPHS &amp; BOXES</b></p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<img src="http://farm4.static.f
== Photos ==
* Bellingham
[[File:2016-06-29-hwc-bellingham.jpg|400px]]
* ...
{{Homebrew Website Club}}
</div>
<!-- h-event -->
$: webmention http://veganstraightedge.com/articles/2016/05/02/rsvp-yes-to-indieweb-summit
Finding links on http://veganstraightedge.com/articles/2016/05/02/rsvp-yes-to-indieweb-summit
Found 3 links:
http://2016.indieweb.org
http://veganstraightedge.com/
https://twitter.com/veganstraightedge/status/727241003195764737
http://2016.indieweb.org
Discovered Webmention endpoint:
curl https://david.shanske.com -I
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 14 Apr 2016 02:28:31 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.4.16
Link: <https://david.shanske.com/?micropub=endpoint>; rel="micropub"
Link: <https://indieauth.com/auth>; rel="authorization_endpoint"
@veganstraightedge
veganstraightedge / 1-schema.rb
Created December 3, 2015 20:50
Is there a Railsy way of doing this kind of thing?
create_table "photos" do |t|
t.string "image_url"
t.integer "post_id"
end
create_table "posts" do |t|
t.string "title"
t.text "content"
end
@veganstraightedge
veganstraightedge / jf2-as-jsonapi.json
Last active November 3, 2015 22:04
An exercise is converting jf2 (a draft work in progress) into compliant JSON API to see what it's like.
{
"links": {
"self": "http://tantek.com/2015/295/t2/example-simple-note",
"prev": "http://tantek.com/2015/295/t1/something",
"next": "http://tantek.com/2015/295/t3/something-else"
},
"data": [{
"type": "entry",
"id": "http://tantek.com/some-slug",
"attributes": {