Skip to content

Instantly share code, notes, and snippets.

🐢
Building the next thing

Shane Becker veganstraightedge

🐢
Building the next thing
Block or report user

Report or block veganstraightedge

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
@searls
searls / client.js
Created May 13, 2018
Sometimes I find it handy when I'm developing a single page app to have all front-end errors forwarded to the backend's log (when something doesn't work, I can look in a single terminal window)
View client.js
const puts = (...anything) => {
fetch("/api/puts", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({content: anything})
})
}
View travel-light.md

The 5-minute backpack demo

Here's what I carry in a Tom Bihn Synapse 19 bag when I travel for 1-to-n days. In general, I optimize for low-weight items, with a secondary focus on reducing maintenance. You can peruse a gallery of pictures, too.

Clothing

View solidity_syntax_pygments.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
@aaronpk
aaronpk / set_dates.rb
Created Jul 6, 2014
An untested script to change the upload date of your Flickr photos to the date the photo was taken
View set_dates.rb
require 'flickraw'
FlickRaw.api_key = ''
FlickRaw.shared_secret = ''
@flickr = FlickRaw::Flickr.new
@flickr.access_token = ''
@flickr.access_secret = ''
# Test if the access token is valid
@sklppr
sklppr / markdown2html.rb
Last active Dec 30, 2015 — forked from brentsimmons/generate_html.rb
Batch conversion of Markdown to HTML.
View markdown2html.rb
#!/usr/bin/env ruby
require "fileutils"
require "redcarpet"
OUTPUT_FOLDER = "html"
HTML_TEMPLATE = <<-HTML
<!DOCTYPE html>
<html>
View generate_html.rb
#!/usr/bin/env ruby
# PBS 4 Dec. 2013
# Renders HTML for all the .markdown files in the current directory.
# Gives each file a .html suffix.
# Saves them in a subfolder called HTML.
require 'rdiscount'
require 'find'
require 'fileutils'
@ehoch
ehoch / gist:1960548
Created Mar 2, 2012
Puma / DJ Procefile on Heroku
View gist:1960548
web: bundle exec puma -p $PORT
worker: bundle exec rake jobs:work
@veganstraightedge
veganstraightedge / caveatPatchor.js
Created Oct 27, 2011 — forked from protocool/caveatPatchor.js
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
View caveatPatchor.js
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@veganstraightedge
veganstraightedge / gist:1138430
Created Aug 10, 2011 — forked from evanphx/gist:1138429
Rubinius HTML Profile
View gist:1138430
$ rbx -Xprofile -Xprofiler.json=glob.json scratch/big_glob.rb
$ rbx render_profile glob.json glob.html
or
$ RBXOPT="-Xprofile -Xprofiler.json=glob.json" rails s
$ rbx render_profile glob.json glob.html
@brianmario
brianmario / config.ru.rb
Created Apr 21, 2011
minimal rails3 app
View config.ru.rb
# minimal rails3 app
require 'action_controller'
Router = ActionDispatch::Routing::RouteSet.new
Router.draw do
root :to => 'site#index'
end
class SiteController < ActionController::Metal
You can’t perform that action at this time.