This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Machinetalk FSM event runner: Ruby Proof-of-concept | |
# | |
# | |
# MIT License | |
# | |
# Copyright (c) 2017 Hedgehog | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strict digraph structs { | |
graph [bb="0,0,582,464"]; | |
node [label="\N"]; | |
subgraph cluster_h1a_h1c { | |
graph [bb="8,8,252,456", | |
label="Host (h1d):h1a", | |
lheight=0.21, | |
lp="130,444.5", | |
lwidth=1.14 | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chef | |
module Mixin | |
module ConsumeJson | |
def consume_json(url) | |
Chef::Log.debug "consume_json: requesting url: #{url}" | |
info = nil | |
fetch(url) do |data| | |
info = JSON.parse(data) | |
Chef::Log.debug "consume_json: parsed: #{info.inspect}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "tilt" | |
require "redcarpet" | |
puts 'loading custom...' | |
module ::Middleman | |
module Renderers | |
class RedcarpetTemplate < ::Tilt::RedcarpetTemplate::Redcarpet2 | |
# Overwrite built-in Tilt version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'md5' | |
class Chargify::HooksController < ApplicationController | |
protect_from_forgery :except => :dispatch | |
before_filter :verify, :only => :dispatch | |
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze | |
def dispatch | |
event = params[:event] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ohai Eec2 meta-data collections and `looks_like_ec2?` | |
# were broken in at least: 0.6.4 and 0.6.10 | |
# | |
# Invitation for wrath of the G-ds: | |
# This gist always seems to have worked to extract (some?/all?) meta-data | |
# | |
# Aslo allows us to avoid #all_plugins, which has needed wait functionality. | |
# See: | |
# http://www.danpisarski.com/2010/08/22/loading-only-the-data-you-want-in-ohai/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.info-block-1 | |
.info-title | |
%h1= link_to "A", "#" | |
%h2 a | |
.infoText | |
%p aaa | |
.info-block-2 | |
.info-title | |
%h1= link_to "B", "#" | |
%h2 b |
NewerOlder