Skip to content

Instantly share code, notes, and snippets.

@bryanbraun
bryanbraun / config
Last active January 30, 2023 00:56
Checkout Github Pull Requests locally without adding remotes
# Edit the .git/config file in your local repo like so:
# cd <path/to/project>
# vim .git/config
# (include the lines below)
[remote "origin"]
url = https://github.com/bryanbraun/anchorjs.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/pull/origin/*
@bryanbraun
bryanbraun / make-ckeditor-image2-alt-text-required.patch
Created November 18, 2014 20:53
A patch to CKEditor's image2 plugin, which makes the alt text field required.
From f788a1a6c27be0fb421d2758492f9366b895ba20 Mon Sep 17 00:00:00 2001
From: Bryan Braun <[email protected]>
Date: Tue, 18 Nov 2014 14:43:17 -0500
Subject: [PATCH] Make the alt-text field required (and add a class for styling
it).
Signed-off-by: Bryan Braun <[email protected]>
---
dialogs/image2.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@bryanbraun
bryanbraun / Octokit_Sinatra_Example.rb
Last active December 21, 2017 13:51
This file is an example Sinatra app.rb file, showing github API Authentication and usage examples of Octokit.rb. For more context on setting up Sinatra to work with the Github API, see http://developer.github.com/guides/basics-of-authentication/.
# app.rb
require "sinatra"
require "sinatra/activerecord"
require 'rest-client'
require 'json'
require 'octokit'
require 'pp' # for pretty print debugging
# Needed for preserving github auth tokens across sessions.