Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
Block or report user

Report or block BinaryMuse

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
@BinaryMuse
BinaryMuse / pre-commit
Created Feb 27, 2010
git pre-commit hook, I use it to detect trailing spaces
View pre-commit
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.
@BinaryMuse
BinaryMuse / EmbeddedGwt.java
Created Mar 28, 2010
DND - Serving GWT app with embedded Java - used on blog
View EmbeddedGwt.java
package net.binarymuse.EmbeddedGwt;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.webapp.WebAppContext;
public class EmbeddedGwt {
public static void main(String[] args) throws Throwable {
View sailthru_settings.txt
HTML Template:
{foreach releases as release}
<h1><a href="{release.link}">{release.title}</a></h1>
<p>{release.teaser}</p>
{/foreach}
<p><small>If you believe this has been sent to you in error, please safely <a href="{optout_confirm_uri}">unsubscribe</a>.</small></p>
Feed URL:
View DND (blog): git on prompt.sh
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ (\1$(parse_git_stash))/"
}
parse_git_stash() {
git stash list 2> /dev/null | wc -l | sed -e "s/ *\([0-9]*\)/\ \+\1/g" | sed -e "s/ \+0//"
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print " ("$1 "/" $2 ")"}'
}
parse_svn_url() {
@BinaryMuse
BinaryMuse / README.md
Created Jul 9, 2010
GWT-Wizard Sample Code
View README.md

Sample code from a page of the Fresno Pacific University Vehicle Reservation Wizard.

RequesterInfoPage.java defines the business logic for the page, as well as the Display interface for the UI; RequesterInfoPageView.java implements the Display interface. Notice that the view extends LazyComposite to lazily create the view on demand (the first time the page is shown).

View gist:475457
#!/bin/bash
# fpu-mount
# parameter one should be the share
# paramater two should be the mountpoint
# the mountpoint will be created if it doesn't exist
SHARE=$1
MOUNTPOINT=$2
@BinaryMuse
BinaryMuse / ContextRemoteServiceServlet.java
Created Jul 14, 2010
policy file fix for GWT app behind reverse proxy
View ContextRemoteServiceServlet.java
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.google.gwt.user.server.rpc.SerializationPolicy;
import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
@BinaryMuse
BinaryMuse / Curl.php
Created Aug 2, 2010
PHP cURL wrapper
View Curl.php
<?php
/**
* Wrapper class that creates Curl_Workers to do
* the heavy lifting for cURL requests.
*/
class Curl {
/**
* Creates and returns a new Curl_Worker
@BinaryMuse
BinaryMuse / rvm.sh
Created Aug 8, 2010
DND (blog): install RVM, Ruby 1.9.2 RC and Rails 3 RC.sh
View rvm.sh
#!/bin/bash
# Install RVM
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
# Modify ~/.bash_profile as necessary and source it to bring in changes
echo "[[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"\$HOME/.rvm/scripts/rvm\"" >> ~/.bash_profile
source ~/.bash_profile
# Install and use Ruby 1.9.2
rvm install ruby-1.9.2-rc2 && rvm use 1.9.2
# Create a gemset for and install Rails 3 RC
rvm gemset create rails3rc && rvm use 1.9.2@rails3rc
You can’t perform that action at this time.