Skip to content

Instantly share code, notes, and snippets.

View howdoicomputer's full-sized avatar
🐙

Tyler Hampton howdoicomputer

🐙
View GitHub Profile
/**
* Fetch a list of station IDs
*
* @param {String} url
* @return {Array} ids
*/
function fetchStationIDList(url, callback) {
request(url, function(error, response, html) {
if (!error && response.code == 200) {
var $ = cheerio.load(html);
/* exported Station */
var _ = require('lodash'),
/*
*async = require('async'),
*/
kue = require('kue'),
config = require('config'),
request = require('request'),
cheerio = require('cheerio'),
/* exported Station */
var _ = require('lodash'),
config = require('config'),
request = require('request'),
cheerio = require('cheerio');
/**
* This module contains functions for scraping and storing data on
* California Data Exchange Center stations.
/* exported Station */
var _ = require('lodash'),
config = require('config'),
request = require('request'),
cheerio = require('cheerio');
/**
* This module contains functions for scraping and storing data on
* California Data Exchange Center stations.
describe('#fetchHydroAreaIDList()', function(){
it('should return an array of IDs from a hydro search', function(done){
var hydroArea = 'CENTRAL+COAST';
var foo = station.fetchHydroAreaIDList(hydroArea);
console.log(foo);
done();
});
});
describe('#fetchHydroAreaIDList()', function(){
it('should return an array of IDs from a hydro search', function(done){
var hydroArea = 'CENTRAL+COAST';
station.fetchHydroAreaIDList(hydroArea, function(stationIDs){
console.log(stationIDs);
done();
});
});
});
### STDOUT for stopping Pacemaker
###
Signaling Pacemaker Cluster Manager to terminate: [ OK ]
Waiting for cluster services to unload:..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^C
### /var/log/corosync/corosync.log
###
Dec 14 01:02:14 [28066] dev-nfs-archive-1001.va.opower.it lrmd: info: upstart_job_ru
@howdoicomputer
howdoicomputer / gist:a6f846eb54c3024a5be9
Last active December 14, 2015 06:08
CIB configuration
node $id="169102664" dev-nfs-archive-1001.va.opower.it
node $id="169102676" dev-nfs-archive-1002.va.opower.it \
attributes standby="off" maintenance="off"
primitive p_export_rbd ocf:heartbeat:exportfs \
params directory="/srv/nfs4" clientspec="10.20.77.0/255.255.255.0" options="rw,async,no_subtree_check,no_root_squash" fsid="1" \
op monitor interval="10s" timeout="20s" \
op start interval="0" timeout="40s"
primitive p_fs_rbd ocf:heartbeat:Filesystem \
params directory="/srv/nfs4" fstype="ext4" device="/dev/rbd1" fast_stop="yes" \
op monitor interval="20s" timeout="40s" \
irb(main):003:0> Feed.all
Feed Load (0.4ms) SELECT "feeds".* FROM "feeds"
=> #<ActiveRecord::Relation [#<Feed id: 1, title: nil, url: nil, description: nil, created_at: "2016-08-02 20:39:38", updated_at: "2016-08-02 20:39:38", items: []>]>
TypeError (no implicit conversion of nil into String):
app/models/feed.rb:14:in `update'
app/controllers/feeds_controller.rb:24:in `create
def update
#prase the url as an rss feed
open(@url) do |rss|
getFeed = RSS::Parser.parse(rss)
#save the title of the feed