This file contains hidden or 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 |
This file contains hidden or 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 'robert.hooke) | |
(require 'leiningen.deps) | |
(require 'lancet.core) | |
(import (java.io File) | |
(java.net URL URLClassLoader) | |
(java.lang.reflect Method)) | |
;; based on code from leiningen.deps (version 1.6.1) | |
(defn- find-lib-jars [project] | |
(.listFiles (File. (:library-path project)))) |
This file contains hidden or 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
(defproject project-name "0.0.1" | |
:dependencies | |
[[org.clojure/clojure "1.2.1"] | |
[org.clojure/clojure-contrib "1.2.0"] | |
[lein-mvn "0.1.0"] | |
[lein-herokujetty "0.1.0"]] | |
:eval-in-leiningen true) | |
(require 'heroku-autobuild) |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.fabiokung</groupId> | |
<artifactId>lift_heroku</artifactId> | |
<version>0.1.0</version> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>app</groupId> | |
<artifactId>roo_heroku</artifactId> | |
<packaging>war</packaging> | |
<version>0.1.0</version> | |
<name>app</name> | |
<properties> | |
<roo.version>1.1.5.RELEASE</roo.version> |
This file contains hidden or 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.fabiokung</groupId> | |
<artifactId>myproject</artifactId> | |
<packaging>war</packaging> | |
<version>0.1.0</version> | |
<name>myproject</name> | |
<repositories> |
This file contains hidden or 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
module Generators | |
def generator(&blk) | |
Fiber.new do | |
loop { Fiber.yield(blk.call) } | |
end | |
end | |
end |
This file contains hidden or 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
# python 2.7.x | |
class Fiber: | |
def __init__(self, callback): | |
self._callback = callback() | |
def resume(self): | |
return self._callback.next() | |
This file contains hidden or 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
$ MORE | |
-bash: MORE: command not found |
This file contains hidden or 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
class Stuff | |
def self.conf(*names) | |
names.each do |name| | |
define_singleton_method(name) do | |
@confs ||= {} | |
@confs[name] | |
end | |
define_singleton_method("#{name}=") do |value| | |
@confs ||= {} | |
@confs[name] = value |