pyvenv-3.3 venvdir
venvdir/bin/python -c 'import sys; print(sys.path)'
# This should print the venvdir in sys.path.
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
import javafx.scene.layout.StackPane; | |
import javafx.scene.web.WebView; | |
/** | |
* A syntax highlighting code editor for JavaFX created by wrapping a | |
* CodeMirror code editor in a WebView. | |
* | |
* See http://codemirror.net for more information on using the codemirror editor. | |
*/ | |
public class CodeEditor extends StackPane { |
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
#!/usr/bin/env ruby | |
# | |
# Passenger management script | |
# By James Smith http://loopj.com | |
# Based heavily on a similar script by Jon Bettcher | |
# | |
# Check memory usage of all paseenger child process and kill if grows | |
# too large. | |
# |
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
build_package_stdout_patch() { | |
wget 'http://bugs.ruby-lang.org/attachments/download/1931/stdout-rouge-fix.patch' | |
patch -p1 < stdout-rouge-fix.patch | |
} | |
require_gcc | |
install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz" stdout_patch standard | |
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby | |
Installing rbx-2.0.0-dev with Ruby 1.9 support using rbenv can be a tad tricky. This is what I did to get up and running, you'll need another version of ruby already installed as well as rake.
The basic outline:
- Clone Rubinius HEAD from github
- Configure installation for rbenv and 1.9 support
- Install Rubinius
- Configure your $PATH to use Rubinius gems
- Start using Rubinius
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
<?php | |
// Based on http://codeigniter.com/forums/viewthread/57902/#284919 | |
/** | |
* Yield | |
* | |
* Adds layout support :: Similar to RoR <%= yield => | |
* | |
* Just output the variable $yield in your layout file which should | |
* be located in application/views/layouts/ |
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 ErbEngine < Haml::Engine | |
def push_script(text, preserve_script, in_tag = false, preserve_tag = false, | |
escape_html = false, nuke_inner_whitespace = false) | |
push_text "<%= #{text.strip} %>" | |
end | |
def push_silent(text, can_suppress = false) | |
push_text "<% #{text.strip} %>" | |
end | |
end |