Skip to content

Instantly share code, notes, and snippets.

View hacknightly's full-sized avatar
:octocat:
On Github

Darrell Banks hacknightly

:octocat:
On Github
View GitHub Profile
@hacknightly
hacknightly / app.js
Last active November 16, 2015 18:41 — forked from superherointj/app.js
// Hello. I'm learning. Thank you for sharing your insights.
var sUtil = require('sUtils.js');
var obj = {
a:[1,2],
b:[3,4],
}
Object.keys(obj).forEach(function(key) {
if (Array.isArray(obj[key])) {
zipstream = require "zipstream"
fs = require "fs"
async = require "async"
class StreamingResponse
filename: ""
files: []
streaming: true
###
script(id='pageTpl', type='text/html')
| <div class="page">
| <div class="head"><%=title%> - <%=path%></div>
| <div class="body">
| <ul>
| <% _(actions).each(function(action) { %>
| <li>
| <%=action.name%> - <%=Helpers.df(action.time)%>
| <% if (action.ext) { %>
| <i class="pop icon-info-sign" data-content="<%=_.template($('#extTpl').html(), action)%>" data-original-title="Extra Information"></i>
@hacknightly
hacknightly / gist:3783894
Created September 25, 2012 19:23 — forked from JosephPecoraro/shell-execution.rb
Shell Execution in Ruby
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111