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
@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": {
@veganstraightedge
veganstraightedge / routes.rb
Last active October 19, 2015 03:41
There's got to be a better way! I'm just writing out the long-hand version the `resources :notes` routes, but with a different path: /notes/YYYY/MM/DD/slug instead of /notes/1. How can I write this more idiomatically?
# Notes Feed
get "/notes/feed", to: "notes#index", defaults: {format: "atom"}, as: :notes_feed
# Notes CRUD
get "/notes/new", to: "notes#new", as: "new_note"
post "/notes", to: "notes#create", as: "notes"
post "/notes/:year/:month/:day", to: "notes#create", constraints: {year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/}
get "/notes/:year/:month/:day/:slug", to: "notes#show", constraints: {year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/}, as: "note"
get "/notes/:year/:month/:day/:slug/edit", to: "notes#edit", constraints: {year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/}, as: "edit_note"
patch "/notes/:year/:month/:day/:slug", to: "notes#update", constraints: {year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/}
/**
* # Post messages using Slack's Webhook
*
* Use this in combination with node-cron to Schedule messages.
* No need to have the hubot invited on the actual channel to post.
*
* ## Dependencies
*
* superagent
* lodash

2000

  • Gladiator
  • Crouching Tiger, Hidden Dragon
  • Traffic
  • What Women Want
  • Meet the Parents
  • Chocolat
  • Erin Brockovich
  • Mission: Impossible II