Skip to content

Instantly share code, notes, and snippets.

/**
* http://gatherer.wizards.com/Pages/Search/Default.aspx?sort=cn+|rarity+&action=advanced&output=checklist&set=%20[%22Dominaria%22]&type=%20![%22Land%22]%20![%22Planeswalker%22]
*/
(function(rows){
var row, info, output = [];
var countMap = {
C: 3,
U: 2,
R: 1,
M: 1
@daveWid
daveWid / pygments.css
Created April 16, 2012 15:26
My Pygments Theme
.highlight {
padding:1em;
background-color:#272820;
color:#F8F8F2;
font-family: "Droid Sans Mono",monospace;
}
.highlight .cp { color: #E77E7E; }
.highlight .sd, .highlight .c1 { color:#AAA; }
.highlight .k { color :#7CB7F1; }
@daveWid
daveWid / controller.php
Created April 11, 2012 12:55
Controller for Kohana
<?php defined('SYSPATH') or die('No direct script access.');
/**
* A base Controller class.
*
* @author Dave Widmer <dwidmer@bgsu.edu>
*/
class Controller extends Kohana_Controller
{
/**
@daveWid
daveWid / build.xml
Created March 21, 2012 19:17
Phing Kohana Application Setup
<?xml version="1.0" encoding="UTF-8"?>
<project name="" default="setup" basedir=".">
<!-- Application setup -->
<target name="setup">
<!-- Initialize git repo -->
<exec executable="git" passthru="true" checkreturn="true" escape="false">
<arg value="init" />
</exec>
<!-- Make the needed directories for the application -->
@daveWid
daveWid / css_test.html
Created February 16, 2012 16:20
A page with a wide gamut of HTML tags on it so you can test your CSS.
<!doctype html>
<html>
<head>
<title>CSS Testing Page</title>
</head>
<body>
<h1>Heading 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nec
tincidunt neque. Aenean augue elit, blandit congue vehicula sit amet,
condimentum id lorem. Aliquam malesuada aliquam eros ut pulvinar.
@daveWid
daveWid / deploy.sh
Created January 26, 2012 18:36
Rsync deployment script
#!/bin/bash
rsync -rvzu ./ USER@SERVER:PATH/ --exclude '/.git*' --exclude '/deploy'
@daveWid
daveWid / kohana-app
Created January 19, 2012 16:01
Setup Kohana 3.2 Application
#!/bin/bash
# Setup the git rep
git init
# Make the needed directories for the application
mkdir -p public/{css,images,js}
mkdir -p classes/{controller,model}
mkdir -p {config,views,cache,logs}
@daveWid
daveWid / internal.php
Created August 25, 2011 18:44
application/classes/request/client/
<?php defined('SYSPATH') or die('No direct script access.');
class Request_Client_Internal extends Kohana_Request_Client_Internal
{
public function execute_request(Request $request)
{
$this->_action_prefix = strtolower($request->method());
return parent::execute_request($request);
}
}
@daveWid
daveWid / .profile
Created June 28, 2011 20:31
Adds a search command to Terminal
function search(){ grep -RnisI "$@" *; }
@daveWid
daveWid / arid-theme-demo.php
Created April 19, 2011 19:50
A Demo theme "controller" for the Arid Wordpress plugin
<?php defined('ARID') or die('Please enable the Arid plugin!');
// Get the page information
$page = new Page(get_body_class());
// Get the template ready
$template = View::factory('template');
$template->set(array(
// Title