This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var fs = require('fs'); | |
var mpath = require('mpath'); // For saving the query from the API json: https://www.npmjs.com/package/mkdirp | |
var mkdirp = require('mkdirp'); // For creating folders that didn't already exist: https://www.npmjs.com/package/mkdirp | |
var menuItem = require('./menuItem.js'); | |
var chainyJsonDoc, name; | |
/** | |
* A module using Bevry's Chainy.js to create DocPad | |
* files via json pulled from an API that follow the following format: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Be sure to save your config files. Optional but I do: | |
sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
# Package repo (for apt-get) | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
# Also probably optional but I like to update sources and upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple Int Array Flattener/De-nester in ECMAScript 5! | |
// Interactive version on Plunker: https://plnkr.co/edit/fjqPJmzxpTFQu8VsToXK | |
(function(){ // Immediately Invoked Function Expression (iife) for safety closure. | |
var firstArray = [[1,2,[3]],4]; // Test array #1, 3 nests deep. | |
var secondArray = [[1,2,[3,[5]]],4]; // Test array #2, 4 nests deep! | |
var flatten = function(arr){ // Our flatten function take an array. | |
var flatArr = []; // New empty array. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`sudo python ./manage.py runserver` | |
``` | |
mikeumus:~/workspace (master) $ python ./manage.py runserver $IP:$PORT | |
Performing system checks... | |
System check identified no issues (0 silenced). | |
November 22, 2015 - 01:49:56 | |
Django version 1.7.4, using settings 'coderbounty.settings' | |
Starting development server at http://0.0.0.0:8080/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docpad update | |
module.js:340 | |
throw err; | |
^ | |
Error: Cannot find module 'lodash' | |
at Function.Module._resolveFilename (module.js:338:15) | |
at Function.Module._load (module.js:280:25) | |
at Module.require (module.js:364:17) | |
at require (module.js:380:17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin.init ./plugins/swift-plugin-docpad | |
views_auto_reload true | |
startWatching() err Error: ENOENT, readdir '/var/lib/stickshift/68ddb90b5961458485e48f57fc58bc92/app-root/data/346321/plugins/swift-plugin-docpad/views' | |
Addon DocPad Plugin error Error: ENOENT, readdir '/var/lib/stickshift/68ddb90b5961458485e48f57fc58bc92/app-root/data/346321/plugins/swift-plugin-docpad/views' | |
Plugins error Error: ENOENT, readdir '/var/lib/stickshift/68ddb90b5961458485e48f57fc58bc92/app-root/data/346321/plugins/swift-plugin-docpad/views' | |
plugins swift-plugin-docpad swift-plugin-docpad | |
final step swift-plugin-docpad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('node', 'event', function (Y) { | |
function scrolledPast(){ | |
Y.all('#main-header').addClass('main-header-scrolled'); | |
} | |
function scrolledTop(){ | |
Y.all('#main-header').removeClass('main-header-scrolled'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rob@ROB-PC ~/Desktop/SunStarIT.com (master) | |
$ git pull | |
remote: Counting objects: 466, done. | |
remote: Compressing objects: 100% (204/204), done. | |
rRemote: Total 466 (delta 214), reused 458 (delta 210)e | |
Receiving objects: 92% (429/466) | |
Receiving objects: 100% (466/466), 132.39 KiB | 0 bytes | |
Resolving deltas: 100% (214/214), done. | |
fatal: index-pack failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Michael@MIKEUMUSSURFACE ~/Desktop/MDM | |
$ nvm install v0.8.16 | |
grep: invalid option -- o | |
Usage: grep [OPTION]... PATTERN [FILE]... | |
Try `grep --help' for more information. | |
Additional options while compiling: | |
nvm: install N/A failed! | |
Michael@MIKEUMUSSURFACE ~/Desktop/MDM | |
$ nvm install 0.8.16 | |
grep: invalid option -- o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: Cannot read property 'a' of undefined | |
at Session.def.get (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad-plugin-minicms\out\utils\sessionBridge.js:17:29) | |
at MinicmsPlugin.module.exports (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad-plugin-minicms\out\routes\root.js:16:17) | |
at callbacks (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad\node_modules\express\lib\router\index.js:164:37) | |
at param (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad\node_modules\express\lib\router\index.js:138:11) | |
at pass (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad\node_modules\express\lib\router\index.js:145:5) | |
at Router._dispatch (c:\Users\Michael\Desktop\MDM\Client Projects\SunStarIT.com\Development\Staging\node_modules\docpad\node_modules\e |