Skip to content

Instantly share code, notes, and snippets.

Joe Fiorini joefiorini

Block or report user

Report or block joefiorini

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
View gist:101
def what_is_gist
"I don't know wtf it is."
end
View gist:106
%h1.title RetireHQ Privacy Policy
#terms.generic
%p Last updated: July 21, 2008
%h2 Data Collected by the RetireHQ Website
%p Your privacy is of paramount importance to us. We believe that by respecting your privacy we will earn the opportunity to build a lasting relationship with your business, your clients and your staff. Any information you provide to us will only be used for the purpose for which it was submitted. We collect your information primarily for contact and billing purposes. Under no circumstances will your information be shared with, or sold to, or disclosed to any third party, except where required by law.
View ember
RSVP.Promise.prototype.returnStatus = function() {
this.then(function() {
return 0;
}).catch(function() {
return 1;
});
return this;
}
View httpRespond-1.1.js
Ember.Test.registerHelper('httpRespond', function(app, verb, url, body, status) {
function tryResponding() {
console.log("matching against url: ", url);
var found = fakehr.match(verb.toUpperCase(), url)
if (found) {
Ember.run(function() {
found.respond(status || 200, {'content-type': 'application/json'}, body);
});
View csrf.js
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
var token;
if (!options.crossDomain) {
token = $('meta[name="csrf-token"]').attr('content');
if (token) {
return jqXHR.setRequestHeader('X-CSRF-Token', token);
}
}
});
@joefiorini
joefiorini / structure.md
Last active Aug 29, 2015
eak-rails transition
View structure.md

Basically, it's a minimal Rails-API app (based loosely on this gist) embedded in an api folder in the root. Then the rest of it is a stock ember-cli setup. I don't know yet exactly how to make Rails look elsewhere for initializers, environments & locales, going to look into it.

api/              *.rb
  controllers/
  models/
  initializers/
  environments/
  locales/
  config.rb
  routes.rb
View keybase.md

Keybase proof

I hereby claim:

  • I am joefiorini on github.
  • I am joefiorini (https://keybase.io/joefiorini) on keybase.
  • I have a public key whose fingerprint is 7427 4C38 7E7A FF20 EA9B 52FA B877 0C41 8A12 B9A0

To claim this, I am signing this object:

View main.js
function loadScript(module) {
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
return new RSVP.Promise(function(resolve, reject) {
script.language = "javascript";
script.src = module.url;
script.onload = function() {
resolve(module);
};
head.appendChild(script);
View linode.ini
# Ansible Linode external inventory script settings
#
[linode]
# API calls to Linode are slow. For this reason, we cache the results of an API
# call. Set this to the path you want cache files to be written to. Two files
# will be written to this directory:
# - ansible-Linode.cache
# - ansible-Linode.index
View Brocfile.js
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
legacyFilesToAppend: [
'jquery.js',
'handlebars.js',
You can’t perform that action at this time.