Skip to content

Instantly share code, notes, and snippets.

Ryan Burnette ryanburnette

Block or report user

Report or block ryanburnette

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
View config.rb
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
preferred_syntax = :sass
@ryanburnette
ryanburnette / slim-html5-boilerplate-ish
Last active Jan 1, 2016 — forked from blakehilscher/slim-html5-boilerplate
It's HTML5 Boilerplate(ish) ... in Slim.
View slim-html5-boilerplate-ish
doctype html
html.no-js
head
meta charset="utf-8"
meta content="IE=edge" http-equiv="X-UA-Compatible"
title Title
meta content="width=device-width,initial-scale=1" name="viewport"
@ryanburnette
ryanburnette / echo.js
Created Jan 2, 2014 — forked from nazgob/hello_node.js
A little node server that just gives your request back to you as JSON.
View echo.js
var http = require('http')
, sys = require('sys')
, server
;
server = http.createServer(function(req, res) {
var echo = {}
;
echo.headers = JSON.stringify(req.headers, true, 2);
@ryanburnette
ryanburnette / sitemap.xml.erb
Last active Feb 4, 2017 — forked from ls-lukebowerman/sitemap.xml.erb
Sitemap template and associated helpers for Middleman.
View sitemap.xml.erb
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<% sitemap_resources.each do |r| %>
<url>
<loc><%= sitemap_path(r) %></loc>
<priority><%= sitemap_priority(r) %></priority>
</url>
<% end %>
</urlset>
View mysql_backup
#! /bin/bash
TIMESTAMP=$(date +"%F")
BACKUP_DIR="./$TIMESTAMP"
MYSQL_USER="backup"
MYSQL_PASSWORD=""
mkdir $BACKUP_DIR
databases=`mysql --user=$MYSQL_USER -p$MYSQL_PASSWORD -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)"`
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View better-errors-padrino.rb
# Gemfile
group :development do
gem "better_errors"
gem "binding_of_caller"
end
# config/boot.rb, after Bundler.require(:default, RACK_ENV)
if Padrino.env == :development
require 'better_errors'
Padrino::Application.use BetterErrors::Middleware
@ryanburnette
ryanburnette / readme.md
Last active Aug 1, 2018 — forked from joelverhagen/README.md
A Jekyll plugin for creating YouTube or Vimeo embed codes.
View readme.md

This is a Jekyll plugin for creating YouTube or Vimeo embed codes.

Usage

Put the plugin file video-embeds.rb in your _plugins directory. Create a tag specifying the type of video you want to embed with the first required argument, the video id.

{% youtube ab1234ab1 %}
You can’t perform that action at this time.