Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Kurtis Rainbolt-Greene krainboltgreene

🏠
Working from home
Block or report user

Report or block krainboltgreene

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
@krainboltgreene
krainboltgreene / gist:512538
Last active Sep 5, 2015
Some rules for a D&D style card game
View gist:512538
* Each player starts off with a party of adventurers (Must be similar alignment, ie Lawful Good, Good, Chaotic Good)
* The adventurers are cards with a level, classes, alignment, skill rank, HP, and abilities.
* To level up a character you replace him with a higher level version of that hero. Example: You have James the L1 Barbarian in your starting line up. You draw James the L2 Barbarian/Fighter, you may discard the james on the field with the higher one in your hand.
* Other cards include Items, Spells, Enchantments, Companions, or Mounts.
* When a player has lost all his adventurers he loses the game.
* To win you attack a player with as many adventurers as you like, and roll a D20 + attack bonus.
* Character can use abilities by rolling their Skill Rank on a D20.
@krainboltgreene
krainboltgreene / gist:515633
Last active Sep 5, 2015
Some rules/guidelines for a community
View gist:515633
* We will never have accounts, registration, subscriptions, or privilaged users.
* We will never hold information about your browser (<em>longer than 12 hours</em>), you (<em>ever</em>), or data related to you (<em>ever</em>).
* We will never release data we have about you, your browser, or data related to you.
* You cannot ever post or link to pornography, erotica, or material that is expressly made to make someone get hot and bothered.
* You cannot ever post or link to content that is racially, religiously, or politically derogatory.
* You cannot ever post or link to content that reveals the identity or personal information of a person that they didn't reveal personally.
* You must remember that while it is your choice to be nice or a dick it is your wording and content that people will judge.
* You must always take care not to post your personal data if you wish your content to be taken at face value.
View gist:558899
def smallest_unit_of_time(before)
seconds = Time.now.to_i - before.to_i
minute = seconds / 60; hour = minute / 60; day = hour / 24
week = day / 7; month = day / 29; quarter = month / 3; year = quarter / 4
decade = year / 10; century = decade / 10; millennium = century / 10
case
when millennium > 0 then "#{millennium} millennium" + "#{'s' if millennium > 1}"
when century > 0 then "#{century} centur" + "#{'ies' ? century > 1 : 'y'}"
when decade > 0 then "#{decade} decade" + "#{'s' ? decade > 1}"
when year > 0 then "#{year} year" + "#{'s' ? year > 1}"
View gist:573073
# This line is a comment. A comment is used to
# document source code. This makes it easier to
# read for others, and yourself.
puts "The Wealthiest Merchant And His Daughter"
puts "========================================"
# Any part of a line after the pound sign is a comment, and not interpreted.
puts "The boy and his lucky dog traveled along the wasteland together." # Like this.
View lyar1.rb
#!/usr/bin/env ruby
author = "Kurtis Rainbolt-Greene"
# created:
# encoding: utf-8
puts "A Boy And His Dog"
puts "================="
puts "It was a cold winter morning in the Forgotten Valley."
puts 'The boy looked to his dog and said, "Look there, Lucky!"'
puts '"The Temple of Golden Arches!" The dog glumly barked.'
View gist:589270
def smallest_time(before)
seconds = Time.now.to_i - before.to_i
minute = seconds / 60; hour = minute / 60; day = hour / 24
week = day / 7; month = day / 29; quarter = month / 3; year = quarter / 4
decade = year / 10; century = decade / 10; millennium = century / 10
case
when millennium > 0 then "#{millennium} millennium" + "#{'s' if millennium > 1}"
when century > 0 then "#{century} centur" + "#{'ies' ? century > 1 : 'y'}"
when decade > 0 then "#{decade} decade" + "#{'s' if decade > 1}"
when year > 0 then "#{year} year" + "#{'s' if year > 1}"
View gist:643640
Bool: A Logical Language
◌ ◌ ◌
□ □ □
□ □ □
□ □ □
◌ □ ◌
Example character:
@krainboltgreene
krainboltgreene / alt-count-to-ten.rb
Created Oct 30, 2010
Learn you the ruby for awesome power samples
View alt-count-to-ten.rb
print (1..10).sum
@krainboltgreene
krainboltgreene / gist:676052
Last active Sep 24, 2015
An example of draper UI
View gist:676052
# This is some sample pseudo-code for a desktop application framework
#
# title: chitter.app - A twitter desktop app
# created: 2020.11.14-00:56:25
# author: Kurtis Rainbolt-Greene
require 'dapper-ui'
require 'looking-glass'
require 'twitter'
View gist:781664
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = BottomW C 100
, lowerOnStart = True
, commands = [ Run Weather "EGPF" ["-t"," <tempF>F","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"] 36000
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Date "%a %b %_d %l:%M" "date" 10
You can’t perform that action at this time.