Skip to content

Instantly share code, notes, and snippets.

View eojthebrave's full-sized avatar

Joe Shindelar eojthebrave

View GitHub Profile
@eojthebrave
eojthebrave / fluid-yammer-dock-badge.js
Created October 20, 2011 13:57
Userscript: provide a Fluid.app dock badge for yammer.com unread messages.
// ==UserScript==
// @name fluid-dock-badge
// @namespace http://fluidapp.com
// @description Dock badge for unread messages on Yammer.com
// @include *
// @author Joe Shindelar (eojthebrave)
// ==/UserScript==
(function ($) {
if (window.fluid) {
setInterval(dockBadge, 5000);
@eojthebrave
eojthebrave / gist:2013763
Created March 10, 2012 22:48
Yammer fluid.add growl support
(function () {
if (window.fluid) {
var last_message_id = 0
// hide the system_notice banner after 10 seconds!
window.setTimeout(function() {
$("system_notice").hide();
}, 10*1000);
window.setInterval(function() {
@eojthebrave
eojthebrave / gist:2013772
Created March 10, 2012 22:50
Yammer Fluid App Userstyle.
body,
div.page-content.two-column-layout,
div.page-content.three-column-layout {
background: none !important;
}
.two-column-layout #column-two {
margin-top: 0px;
}
@eojthebrave
eojthebrave / gist:2854188
Created June 1, 2012 18:25
Alfred App Custom Searches
# Search the Drupal 7 API
alfredapp://customsearch/Drupal%207%20API/dp/ascii/url=http://api.drupal.org/api/search/7/{query}
# Search the Drupal 6 API
alfredapp://customsearch/Drupal%206%20API/dp6/ascii/url=http://api.drupal.org/api/search/6/{query}
# Enter a module/theme name and go right that page
alfredapp://customsearch/Drupal%20Project/dpp/ascii/url=http://drupal.org/project/{query}
# Use Google to search drupal.org
@eojthebrave
eojthebrave / yammer.css
Last active October 8, 2015 07:07 — forked from q0rban/yammer.css
Fluid Userstyle for Yammer
div.page-content.two-column-layout,
.column-two-left,
.yj-main-content{
margin-left: auto !important;
margin-right: auto !important;
width: 500px !important;
}
#column-two {
width: 100% !important;
@eojthebrave
eojthebrave / yammer_test.html
Created November 16, 2012 17:52
Yammer | OAuth 2 | Implicit Grant
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {
var match = hash.match(/access_token=(\w+)/);
return !!match && match[1];
};
@eojthebrave
eojthebrave / *.recurly.com.js
Created July 3, 2013 15:09
dotjs script for send recurly push notifications from the log on the recurly site to your callback url.
/*
Works in conjunction with dojs (https://github.com/defunkt/dotjs) to allow
passing request logged in the Recurly push notification window to a local host
without setting up port forwarding or the like.
Useful for testing push notifications on a localhost.
In order for this to work you need to add the following to the .htaccess file
of your local site otherwise you will get Cross Origin Request (CORS) errors.
@eojthebrave
eojthebrave / gist:7369717
Created November 8, 2013 11:28
Setup Apache Solr to work with Drupal 7.x on a Mac using homebrew.
# I did this from the root directory of our git repo. But you can probably
# do it from anywhere.
brew install solr
mkdir solr-config
cp -r /usr/local/Cellar/solr/4.5.0/libexec/example/ solr-config/
cp docroot/sites/all/modules/contrib/apachesolr/solr-conf/solr-4.x/* solr-config/solr/collection1/conf/
cd solr-conf
java -jar start.jar
@eojthebrave
eojthebrave / gist:7915294
Created December 11, 2013 17:58
Open Textual's preferences, and under the style section click "Browse style files" to start editing your textual theme. Add something like the following below. It's just CSS so you can do just about anything. There's also a JS API you can tie into.
/* Apply a background image to both the #lullabot and #drupalizeme channels */
body[channelname="#lullabot"] {
background: url(https://dl.dropboxusercontent.com/u/63787/lullalogo.png) no-repeat fixed bottom right;
}
body[channelname="#drupalizeme"] {
background: url(https://dl.dropboxusercontent.com/u/63787/dmelogo.png) no-repeat fixed center center;
}
@eojthebrave
eojthebrave / gist:05b105a1c7a95a019a42
Created May 9, 2014 14:42
Drupal 7 services module session auth with cURL
`curl http://services-demo.lan/api/v1/user/login -d '{"name":"admin","pass":"admin"}' -H "Content-type: application/json" -H "Accept: application/json"`
`curl hhttp://services-demo.lan/api/v1/system/connect -X POST`
`curl http://services-demo.lan/api/v1/system/connect -H "Cookie: SESS60f8c5b86739b7e326223b4ef35867b2=A86XHGJWlnDcMOGcArbOT-qHrsIi5P2NrcoNTXwWluw" -H "X-CSRF-Token: T77haXwD7JKOJsBlKP3p3kLbjQO96bQWvGJAE1_PUZM" -X POST`
`curl http://services-demo.lan/api/v1/user/login -X POST -H "Content-type: application/json" -H "Accept: application/json"`