Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@opn
opn / learnyounode_errors
Created November 29, 2015 23:54
npm instal -g learnyounode errors
npm install -g learnyounode
npm WARN install:minimist ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/learnyounode/node_modules/lab/node_modules/minimist' -> '/usr/local/lib/node_modules/learnyounode/node_modules/lab/node_modules/minimist'
npm WARN install:async ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/learnyounode/node_modules/uglify-js/node_modules/async' -> '/usr/local/lib/node_modules/learnyounode/node_modules/uglify-js/node_modules/async'
npm WARN install:source-map ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/learnyounode/node_modules/uglify-js/node_modules/source-map' -> '/usr/local/lib/node_modules/learnyounode/node_modules/uglify-js/node_modules/source-map'
npm WARN install:ansi-styles ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/learnyounode/node_modules/workshopper-adventure/node_modules/ansi-styles' -> '/usr/local/lib/node_modules/learnyounode/node_modules/workshopper-adventure/node_modules/ans
@opn
opn / script,stack 'lib_GitHub'
Last active April 10, 2016 22:04
This stack contains all the handlers that are specific to Himalayan Academy site structure.
--> MetaData
-
copyright: David Bovill
license: GPLv3
name: lib_GitHub
type: script library
version: 0.3
/*
A library for interfacing with GitHub
@opn
opn / handler, _constructIssueJSON
Created April 10, 2016 16:50
This is just a test for a private function.
private function _constructIssueJSON someTitle, pBody, pAssignee, pMilestone, pLabelArray
put someTitle into jsonArray ["title"]
if pBody is not empty then
put pBody into jsonArray ["body"]
end if
if pAssignee is not empty then put pAssignee into jsonArray ["assignee"]
if pMilestone is not empty then put pMilestone into jsonArray ["milestone"]
if pLabelArray is an array then
put pLabelArray into jsonArray ["labels"]
@opn
opn / script,stack 'lib_HAP'
Last active April 10, 2016 18:40
This stack contains all the handlers that are specific to Himalayan Academy site structure.
--> MetaData
-
license: GPLv3
name: lib_HAP
type: script library
version: 0.4
/*
This script-only stack is designed to work as a library file for the [[Himalayan Academy Web Site]].
@opn
opn / handler,command menu_ConstructSiteMap
Last active April 10, 2016 18:59
A handler to construct sitemaps locally.
on menu_ConstructSiteMap mTarget, refinementName
-- version 2
put hap_ConstructShortSitemapFileName (refinementName) into shortSitemapFile
put sitemap_ListFileIDs (refinementName) into fileIDs
put sitemap_Build (fileIDs, refinementName, pPriority) into sitemapXML
sitemap_Save shortSitemapFile, sitemapXML
put sitemap_Fetch (shortSitemapFile)
end menu_ConstructSiteMap
@opn
opn / script,stack 'rig_FileHelper'
Created April 10, 2016 22:14
A script-only-stack version of revIgniter's File helper script.
--> MetaData
-
copyright: Copyright (c) 2009 - 2015, dimensionB Bitter u. Bitter GmbH
license: http://revigniter.com/userGuide/license.html
name: rig_FileHelper
type: script library
version: 0.2
--| Location: ./system/helpers/fileHelper.lc
@opn
opn / handler: function rig_StackFolder
Created April 12, 2016 19:03
This handler returns the path to the revIgniter stack folder and ensures that it ends in a "/".
function rig_StackFolder rigApplicationFolder
if the environment = "server" then
-- we don;t need to switch servers so revIgniter can handle this easily
return gApplicationFolder & "/" & "stacks/"
else
text_AddTrailing rigApplicationFolder, "/"
put "stacks/" after rigApplicationFolder
return rigApplicationFolder
end if
end rig_StackFolder
@opn
opn / handler: command daemon_RouteRequest
Created April 16, 2016 16:33
A handler for routing.
command daemon_RouteRequest requestArray
-- this is the core handler that lib_Daemon dispatches
set the itemdelimiter to "/"
request_DeconstructArray requestArray, socketID, someMethod, someRoute, queryString, requestUrl
switch someMethod
case "GET"
process_GET someRoute, socketID, requestArray
break
case "POST"
process_POST someRoute, socketID, requestArray
@opn
opn / gist:280754d59d258305731e5fdcc1d2a15d
Created April 23, 2016 11:19
Nginx with LUA installation on OSX
$ brew update
Updated Homebrew from 2921795 to c20622a.
Updated 1 tap (homebrew/core).
==> New Formulae
parquet-tools
==> Updated Formulae
buku gst-plugins-good kubernetes-cli
gst-editing-services gst-plugins-ugly solr
gst-libav gst-python tippecanoe
gst-plugins-bad gst-validate
@opn
opn / script,stack 'fedwiki.lc'
Created June 19, 2016 06:31
A set of tools for manipulating Fedwiki pages.
on index
put fedwiki_GetDroppedUrl ($_POST_RAW) into droppedURL
put fedwiki_ConstructErrorJSON (droppedURL &CR&CR& $_POST_RAW) into errorJSON
fedwiki_ReturnJSON errorJSON
end index
on fork_Cleaner
put fedwiki_GetDroppedUrl ($_POST_RAW) into droppedURL
put fedwiki_CleanLastLineUpJournal (droppedURL, "create,fork", "fedwiki-transport") into cleanJSON
fedwiki_ReturnJSON cleanJSON