Skip to content

Instantly share code, notes, and snippets.

@ianpetzer
ianpetzer / controllers.application.js
Last active November 5, 2018 15:41
Query params issue
import Ember from 'ember';
import {
inject as service
} from '@ember/service';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
queryParams: ['appQP'],
router: service(),
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@ianpetzer
ianpetzer / gist:055e8bfaa43764a67e686434c745216c
Last active November 22, 2016 14:23
Adventure / Endurance related books
It all started with Bryony asking for adventure / endurance book recommendations on Facebook. The list of books in the comments was too useful to let fade into obscurity, so I copy pasted all the comments into this list. None of the comments or recommendations below are mine, but some amazing looking books here
Scott Jurek's stuff
Alex Honnold, Alone on the Wall
Brett Archibald's survival story - book is called “Alone” - Riveting read
Dividing the Great....
Freedom rider - Kevin Davie
Born to Run
A Life Without Limits - Chrissie Wellington...really an interesting read and quite a phenomenal young lady
Two Hours
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
count: null,
queryParams: {
count: {
replace: true
OS/X 10.95
2.8 Ghz i5
SSD
Initial build:
Build successful - 12429ms.
Slowest Trees | Total
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
npm http 304 http://registry.npmjs.org/cli-color
> bcrypt@0.7.7 install /mnt/data/1/node_modules/bcrypt
> node-gyp rebuild
Traceback (most recent call last):
File "/nave/installed/0.10.23/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
sys.exit(gyp.script_main())
File "/nave/installed/0.10.23/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 534, in script_main
return main(sys.argv[1:])
@ianpetzer
ianpetzer / gist:7546858
Created November 19, 2013 15:16
Node.js passthrough
function passThrough(target) {
return function(req, res) {
req.pipe(request(target+req.path)).pipe(res);
};
}
app.all('/api/*', passThrough("http://localhost:8000"));
@ianpetzer
ianpetzer / gist:7115687
Created October 23, 2013 09:49
Using node.js to make payment using a stored card in Peach Payments
var request = require('request'),
Config = require('./config'),
config = new Config();
//Simple config to hold environment specific values
exports.makePayment = function(data, callback) {
var params = {
'SECURITY.SENDER': config.securitySender,
@ianpetzer
ianpetzer / gist:7004202
Created October 16, 2013 07:59
Description of how to retrieve the WPF Url for Peach Payments using Node.js
var request = require('request');
exports.getPaymentUrl = function(data, callback) {
//You will need to supply values for these first four values
var params = {
'SECURITY.SENDER': 'xxxx',
'USER.LOGIN': 'xxxx',
'USER.PWD': 'xxxx',
'TRANSACTION.CHANNEL': 'xxxxx',