Skip to content

Instantly share code, notes, and snippets.

View mseymour's full-sized avatar

Mark Seymour mseymour

View GitHub Profile
@mseymour
mseymour / select2-bootstrap-v4.0.0-Beta.css
Last active October 11, 2017 12:28 — forked from DaleMckeown/select2-bootstrap-v4.0.0-Beta.css
Select2 Bootstrap theme for Bootstrap Beta. SCSS and CSS versions (compiled to my Bootstrap specs)
.select2-container--bootstrap {
display: block;
/*------------------------------------* #COMMON STYLES
\*------------------------------------*/
/**
* Search field in the Select2 dropdown.
*/
/**
* No outline for all search fields - in the dropdown
* and inline in multi Select2s.
@mseymour
mseymour / azurebot definitions August 30 2015 1224AM.yml
Last active August 30, 2015 03:31
A crapload of definitions dumped from my IRCbot. All 2947 of them. For the record, a good part of them are probably pony-related. (Blame #celestiaradio on Canternet.)
---
term:holymacintosh:
term.case: HolyMacintosh
dfn: ! 'worst pony #69 for not knowing the answer to random questions.'
edited.by: zazq
edited.time: '2013-09-20 01:55:01 -0300'
term:command list:
term.case: command list
dfn: http://pastebin.com/ZfPyT51X
edited.by: Chocolate_Chip|Phone
@mseymour
mseymour / 1-CR api.md
Last active August 29, 2015 13:57
Celestia Radio API v3 docs

Celestia Radio API v3

This document is for documenting the next generation of Celestia Radio's online API.

As of the start of development (2014-03-28), the documentation is incomplete and will change over time.

Methods

/api

@mseymour
mseymour / BannerImageExtension.php
Created November 11, 2013 02:30
BannerImageExtension, for creating background banners on various pages.
<?php
class BannerImageExtension extends Extension {
public function ArtDirectionImage($width, $height) {
return $this->getFormattedImage('ArtDirectionImage', $width, $height);
}
public function generateArtDirectionImage(Image_Backend $backend, $width, $height) {
$backend->set_backend('ImagickBackend');
print 'SS3.1: BannerImageExtension backend: '.$backend->get_backend();
@mseymour
mseymour / presidents.json
Last active December 24, 2015 03:29
a JSON file that describes an HTML form for submission.
{
"title": "Regional Presidents Report",
"report_type": "club",
"form": [
{
"title": "Identification",
"items": [
{ "type": "text", "label": "Full Name" },
{ "type": "email", "label": "Email" },
{ "type": "text", "label": "Club" },
@mseymour
mseymour / Cog.scpt
Created August 19, 2013 21:50
A Textual plugin script that gets the currently playing song from Cog, and scrapes the UI for the current position to calculate time remaining.
-- Copyright © 2013 Mark Seymour (mark.seymour.ns@gmail.com)
on textualcmd()
tell application "System Events"
tell application "System Events" to set isRunning to exists (processes where name is "Cog")
set curpos to value of static text of group 2 of tool bar 1 of window of application process "Cog"
end tell
set listening to "/me np: "
@mseymour
mseymour / away error
Created June 20, 2013 23:14
Cinch - exception on receiving an AWAY command from another client
[2013/06/20 20:09:51.410] >> :MmmBacon0!MmmBacon0@Pony.Should.Pony.Pony PRIVMSG #celestiaradio :I just can't remember what.
[2013/06/20 20:09:51.411] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000002c6e100 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1f698> -- 1 in total.
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000002d273d0 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1eef0> -- 1 in total.
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000001df4430 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1d938> -- 1 in total.
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000001e5c030 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1d438> -- 1 in total.
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:message patte
[2013-05-19 16:15:14] requirements_osx_brew_libs_install
requirements_osx_brew_libs_install ()
{
brew unlink "$@" && brew install "$@" || {
typeset ret=$?;
rvm_warn "There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation";
case "$_system_version" in
10.6)
rvm_warn "On OSX 10.6 instead of command line tools install:
@mseymour
mseymour / plugin_layout_ideas.rb
Created January 12, 2013 08:44
Trying to come up with plugin layout ideas for my own IRC framework... I am too biased right now, so everything is very similar to Cinch.
module Sussex
module Plugins
# This is just a class for laying out possible plugin ideas.
# I have been using Cinch for about a year and a half now, so I am quite
# biased in terms of plugin design for something like this...
# Note that I also use an include for including methods/etc. into the plugin
# There are probably other ways of doing this as well.
class MyPlugin
include Sussex::Plugin
@mseymour
mseymour / irc.rb
Last active December 10, 2015 10:38
A very very very basic IRCbot.
require 'socket'
require 'logger'
require 'logger/colors'
require 'thread'
Thread.abort_on_exception = true
class IRC
attr_reader :nick, :user, :gecos
attr_reader :server, :port
attr_reader :socket, :logger, :capabilities, :isupport, :casemapping