Navigation Menu

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: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',
@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
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,
Ian:cvEAK ian$ cat package.json
{
"name": "contractvault",
"namespace": "contractvault",
"version": "0.0.0-16",
"main": "server/server.js",
"directories": {
"doc": "doc",
"test": "test"
},
info: Welcome to Nodejitsu contractvault
info: jitsu v0.13.2, node v0.10.17
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server/server.js
info: Checking app availability contractvault
info: Creating app contractvault
info: Creating snapshot 0.0.0-16
info Uploading: [=============================] 100%
error: Error running command deploy