Skip to content

Instantly share code, notes, and snippets.

@gjritter
gjritter / Chorkie.md
Created June 30, 2019 23:03
Chorkie’s Combat Notes

Mounted Combat

When possible, Chorkie likes to take advantage of mounted combat. If a day will allow the use of a mount, he would cast Find Steed the night before (and Corville wou;d participate in the watch). Some notes from the PHB are below. In particular, some spells that are dual-castable per the Find Steed spell description (affecting both mount and rider) are the following (c denotes concentration):

Armor of Agathys Detect Evil and Good (c) Detect Magic (c) Detect Poison and Disease (c) Divine Favor (c) Searing Smite (c)

@gjritter
gjritter / gist:4597854
Created January 22, 2013 19:52
The setSelected:animated: and setHighlighted:animated: methods of UITableViewCell appear to make all of the selected background view's subviews transparent. This is annoying when the selected background view contains views that you intend to be non-transparent (like the custom dividers in this example). It necessitates having to add the colors b…
- (id) initWithCoder:(NSCoder*) coder {
if (self = [super initWithCoder:coder]) {
self.backgroundView = [self createBackgroundViewWithBackgroundColor:[UIColor clearColor]];
self.selectedBackgroundView = [self createBackgroundViewWithBackgroundColor:[UIColor colorWithWhite:57.0f/255.0f alpha:1.0f]];
}
return self;
}
- (UIView*) createBackgroundViewWithBackgroundColor:(UIColor*) backgroundColor {
UIView* backgroundView = [[UIView alloc] initWithFrame:self.bounds];
@gjritter
gjritter / gist:3876791
Created October 12, 2012 01:14
Custom segue to flip between a source and destination controller within a navigation controller
- (void) perform {
UIViewController* source = self.sourceViewController;
[UIView transitionWithView:source.navigationController.view duration:0.5f options:UIViewAnimationOptionTransitionFlipFromRight animations:^{
[source.navigationController setViewControllers:@[self.destinationViewController] animated:NO];
} completion:nil];
}
var http = require('http'),
sys = require('sys'),
couchdb = require('./lib/couchdb'),
port = process.env.PORT || 8001,
COUCH_PORT = 5984,
COUCH_SERVER = 'localhost',
COUCH_USER = null,
COUCH_PASSWORD = null;
function getCounter(callback) {
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import random
class SimpleCounterShard(db.Model):
count = db.IntegerProperty(required=True, default=0)
NUM_SHARDS = 10
var sys = require("sys"),
http = require("http");
data = '/';
url = 'www.google.com';
url = 'www.neeraj.name'
var con = http.createClient(80, url);
/*global require, process */
(function() {
var http = require('http'), posix = require('posix'), url = require('url'), cache = {}, mime_types = {};
function extname(path) {
var index = path.lastIndexOf('.');
if (index < 0) {
return;
}
return path.slice(index + 1);
// this returns undefined, not the object that follows the return
return
{
foo: "bar"
};
var http = require('http');
// example usage:
//
// var nerve = require('./nerve');
//
// nerve.create_app(
// [
// [/^\/hello\/(.*)$/, function(req, res, name) {
// res.send_html('Hello, ' + name + '!');
var http = require('http');
// example usage:
//
// require('./nerve');
//
// nerve([
// [/^\/hello\/(.*)$/, function(req, res, name) {
// res.send_html('Hello, ' + name + '!');
// }]