Skip to content

Instantly share code, notes, and snippets.

View andymeneely's full-sized avatar

Andy Meneely andymeneely

View GitHub Profile
@andymeneely
andymeneely / gist:6dd8ced16ad61335236a
Created March 3, 2015 02:42
My cygwin package setup for Squib
$ cygcheck -c
Cygwin Package Information
Package Version Status
_autorebase 001002-1 OK
_update-info-dir 01352-1 OK
adwaita-icon-theme 3.14.1-1 OK
alternatives 1.3.30c-10 OK
at-spi2-core 2.14.1-1 OK
autoconf 13-1 OK
autoconf-archive 2014.10.15-1 OK
require 'squib'
Squib::Deck.new(cards: 2) do
background color: 'white'
text str: %w(Hello World!), font: 'Serif Bold 72'
save_png prefix: 'basic_'
end
@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',
@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 / _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 / 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'
@andymeneely
andymeneely / tgc-client.py
Created January 19, 2014 19:41
Using The Game Crafter API with Python
import requests #Found at python-requests.org/
url="https://www.thegamecrafter.com/api"
api_key_id = '' #Replace with yours
username = '' #Replace with yours
password = '' #Replace with yours
#Get a Session
params = {'api_key_id': api_key_id, 'username' : username, 'password': password}
response = requests.post(url + "/session", params=params)
@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 / 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 / .gitignore
Last active March 15, 2016 22:15
Squib Sample: autoscale_font.rb
*.png
!card_00_expected.png