lachlanhardy (owner)

Forks

Revisions

gist: 110503 Download_button fork
public
Public Clone URL: git://gist.github.com/110503.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
# assume we're passing the values from the file below as arguments to the following:
# WTF is name always nil?
 
def filtered_filenames(paths)
    paths ||= []
    paths.collect { |path|
      path[/.+\/(.+)$/, 1]
    }.reject { |name|
      name == "index.haml"
    }
end
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This is a Dir.glob of a folder.
 
"views/articles/74-twitter-adds-a-breakdown"
"views/articles/action-reaction"
"views/articles/ardent-about-arduino"
"views/articles/bitter-twitches"
"views/articles/gitjour-the-quickening"
"views/articles/index.haml"
"views/articles/internet-gurus"
"views/articles/joining-the-conversation"
"views/articles/local-government-open-web"
"views/articles/make-the-leap"
"views/articles/meraki-madness"
"views/articles/meshing-with-meraki"
"views/articles/nonscary-way-of-learning-openid"
"views/articles/phishing-fools"
"views/articles/pimping-your-github-commits-js"
"views/articles/podcast-for-your-pleasure"
"views/articles/remix-australia-rocked"
"views/articles/share-the-love"
"views/articles/sun-said-what"
"views/articles/test"
"views/articles/twitterific-troll-filter"
"views/articles/x-ua-compatible-past-thoughts-of-children"