Skip to content

Instantly share code, notes, and snippets.

View nicholaides's full-sized avatar

Mike Nicholaides nicholaides

View GitHub Profile
<!-- app/views/houdini_templates/post.html.erb -->
<h2>Review the image for offensiveness</h2>
<h3>Instructions</h3>
<p>Please review the image below.</p>
<img src="<%= post.image_url %>">
<p>
@nicholaides
nicholaides / chaing.javascript
Created February 28, 2011 15:42
How do you do this in coffeescipt?
var req = $.get('foo.htm')
.success(function( response ){
// do something with the response
})
.error(function(){
// do something if the request failed
});
@nicholaides
nicholaides / .rspec
Created March 17, 2011 19:56
Spec helper w/ Spork. Spork pre, Rails 3, Rspec 2
--color
--debug
--backtrace
--drb
@nicholaides
nicholaides / jade_usage.js
Created April 1, 2011 16:20
How to use Jade client-side
window.Jade = require('jade');
JadeTemplates = {};
JadeTemplates["some_template"] = Jade.compile("li.feedback.exercise_item.checkbox\n input(type=\"hidden\", name=\"exercise[feedback_items_attributes][$order][_type]\", value=\"Checkbox\")\n\n - if (this.is_editing)\n != partial(\"item_actions\")\n\n .body\n .checkbox\n input(type=\"checkbox\", disabled, checked)\n\n .title\n - if (this.is_editing)\n input(name=\"exercise[feedback_items_attributes][$order][title]\", value=this.title, placeholder=\"E.g. &quot;I completed this exercise&quot;\", \"data-bvalidator\"=\"required\")\n\n - if (this.is_viewing)\n label= this.title\n");
JadeTemplates["exercises/_Image"] = Jade.compile("a.image(href=this.file_url)\n\timg(src=this.file_thumb_url)\n");
// defines the helpers "exercise_item" and "partial"
@nicholaides
nicholaides / response-keys.txt
Created October 27, 2013 18:16
CloudStack API response keys
account
accountdetails
accountid
accounttype
aclid
acltype
action
activeviewersessions
affinitygroup
algorithm
@nicholaides
nicholaides / decode_gelf.rb
Created February 21, 2014 18:51
Decode GELF data
def decode(data)
JSON.parse(Zlib::Inflate.inflate(data.join.each_byte.to_a.pack('C*')))
end
# usage: decode(APP_LOGGER.notify(some_data))
@nicholaides
nicholaides / configuration_with.rb
Last active August 29, 2015 13:59
Configuration comparison
require 'attributes'
module StackerBee
class Configuration
include Attributes
attribute :ssl_verify?, default: proc { true }
attribute :url
attribute :secret_key
attribute :api_key
@nicholaides
nicholaides / sso plan.md
Last active August 29, 2015 14:00
SSO Plan

Tasks:

  • Create a proxy ala sorcery that will:
  • Omniauth config:
    • point to the made-up-endpoint
@nicholaides
nicholaides / job.md
Last active August 29, 2015 14:03
PromptWorks Senior Software Engineer job listing

PromptWorks is a burgeoning software consulting company based in Philadelphia, PA seeking a Senior Software Engineer.

About the position

Senior software engineer responsibilities include:

  • Writing quality software for and providing technical direction to our clients
  • Interfacing directly with our clients, gathering their needs and managing their expectations
  • Taking ownership of our work-product
  • Working well in a small team and independently when necessary
@nicholaides
nicholaides / keybase.md
Created July 16, 2014 21:16
keybase.md

Keybase proof

I hereby claim:

  • I am nicholaides on github.
  • I am nicholaides (https://keybase.io/nicholaides) on keybase.
  • I have a public key whose fingerprint is 8144 058C 973F 358A D27D D84F 52DB F822 9A78 6E8B

To claim this, I am signing this object: