Skip to content

Instantly share code, notes, and snippets.

Jeff Gosling JeffGos

Block or report user

Report or block JeffGos

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
@JeffGos
JeffGos / ghost
Last active Feb 8, 2017
Centos init script for ghost blogging tool
View ghost
#!/bin/sh
#
# ghost - run ghost blogging tool
#
# https://ghost.org/developers/
. /etc/rc.d/init.d/functions
ghosthome="/var/www/ghost/"
exec="/usr/bin/node index.js >> /var/www/ghost/ghost.log &"
@JeffGos
JeffGos / gist:a4418b7e0116a22092c9
Created Aug 7, 2014
Knockoutjs add array of items to observableArray
View gist:a4418b7e0116a22092c9
ko.observableArray.fn.pushAll = function (valuesToPush) {
var underlyingArray = this();
this.valueWillMutate();
ko.utils.arrayPushAll(underlyingArray, valuesToPush);
this.valueHasMutated();
return this;
};
var viewModel = {
valuesArray : ko.observableArray([])
@JeffGos
JeffGos / gist:3eef4eb84451c9591897
Last active Aug 29, 2015
Knockoutjs observableArray with null properties in array items
View gist:3eef4eb84451c9591897
<table>
<thead>
<tr>
<th>Name</th>
<th>Something that could be NULL</th>
</tr>
</thead>
<tbody data-bind="foreach: valuesArray">
<tr>
<td data-bind="text: Name"></td>
You can’t perform that action at this time.