Skip to content

Instantly share code, notes, and snippets.

View andymeneely's full-sized avatar

Andy Meneely andymeneely

View GitHub Profile
@andymeneely
andymeneely / ranges.rb
Created February 9, 2016 21:31
Squib sample: ranges
require 'squib'
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
'type' => ['Thug', 'Thinker', 'Thinker'],
'level' => [1,2,3]}
Squib::Deck.new(width: 825, height: 1125, cards: 3) do
# Default range is :all
background color: :white
text str: data['name'], x: 250, y: 55, font: 'Arial 54'
@andymeneely
andymeneely / _pnp_productions.rb
Last active January 14, 2016 19:36
Squib sample: publishers
require 'squib'
# Save our poker cards to the template used by PNP Productions (http://www.printplaygames.com/)
Squib::Deck.new(cards: 20, layout: 'pnp_productions.yml') do
rect layout: :poker_cut# cut
rect layout: :poker_safe
text str: (%w(This is some example text) * 4)
# save_png range: 0, dir: '.'
@andymeneely
andymeneely / Gemfile
Last active December 28, 2015 04:16
Chalkify GameIcons via Squib and SVG
gem 'squib', git: 'git://github.com/andymeneely/squib', branch: 'dev'
gem 'guard'
_output/*.png
_output/*.pdf
~$*
.DS_Store
@andymeneely
andymeneely / _built_in_layouts.rb
Last active November 29, 2015 02:56
Squib Exmaples: built-in layouts
require 'squib'
# This sample demonstrates the built-in layouts for Squib.
# Each card demonstrates a different built-in layout.
Squib::Deck.new(layout: 'fantasy.yml') do
background color: 'white'
set font: 'Times New Roman,Serif 32'
hint text: '#333' # show extents of text boxes to demo the layout
@andymeneely
andymeneely / .gitignore
Last active March 16, 2016 03:24
Squib Sample: text
*.png
!_text_00_expected.png
@andymeneely
andymeneely / .gitignore
Last active March 16, 2016 03:08
Squib Examples: From SSE presentation
*.png
!part*_expected.png
@andymeneely
andymeneely / sane_defaults.rb
Last active November 5, 2015 15:09
Squib Sample: Sane Defaults
require 'squib'
Squib::Deck.new do
rect
text
save_png
end
@andymeneely
andymeneely / .gitignore
Last active April 12, 2016 01:10
Squib sample: images
*.png
!ball.png
!grit.png
!sprites.png
!with-alpha.png
!_images_00_expected.png
!shiny-purse.png
@andymeneely
andymeneely / punchcard.rb
Created October 20, 2015 21:59
Slack Punchcard
require 'json'
require 'pp'
# To run this, create a directory called "export" in the current directory.
# Get admin access to Slack
# Get an export of the data.
# This will search export/standup/*.json files
users = {
'U0AB5BETT' => 'andymeneely',