This file contains 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
> RUBY_VERSION | |
=> "1.9.3" | |
> RUBY_PLATFORM | |
=> "java" | |
> JR | |
JRUBY_REVISION JRUBY_VERSION JRuby | |
> JR | |
JRUBY_REVISION JRUBY_VERSION JRuby | |
> JRUBY_ | |
JRUBY_REVISION JRUBY_VERSION |
This file contains 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
> Pathname.new 'uri:classloader:/Users/bschanfeldt/Repos/Github/jruby/jruby/README.md' | |
=> <Pathname:uri:classloader:/Users/bschanfeldt/Repos/Github/jruby/jruby/README.md> | |
> p = _ | |
=> <Pathname:uri:classloader:/Users/bschanfeldt/Repos/Github/jruby/jruby/README.md> | |
> p.absolute? | |
=> false |
This file contains 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 UsersController < ApplicationController | |
# Creates an encrypted, base64 encoded url. http://localhost/confirm?_=hBRCGVqie5PetQhjiagq9F6kmi7luVxpcpEYMWaxrtSHIPA3rF0Hufy6EgiH%0A%2BL3t9dcgV9es9Zywkl4F1lcMyA%3D%3D%0A | |
@to_encrypt = save_space(params[:user], {:firstname => :fn,:lastname => :ln,:email => :el,:username => :un,:password => :pd}) | |
encrypted_params = CGI::escape(Base64.encode64(encrypt(Marshal.dump(@to_encrypt), "secret"))) | |
render :text => "#{encrypted_params}" | |
def confirm | |
@decrypted = Marshal.load(decrypt(Base64.decode64(params[:_]), "secret")) |
This file contains 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 Prawn | |
class Document | |
#module CropMarks | |
def draw_crop_marks(spacing, margin, lineweight) | |
#crop mark line thickness | |
line_width(lineweight) | |
#spacing = 2.125 | |
#margin = 9 |
This file contains 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
def import | |
xml = open(params[:_]).read # Param for opening an XML file ( http://localhost/import?_=http://localhost/companies.xml ) | |
doc = REXML::Document.new(xml) | |
@import = initialize_import(doc) | |
respond_to do |format| | |
format.html | |
end | |
end | |
# Process parent XML elements |
This file contains 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
template = | |
{ | |
form:{ | |
method:"post","class":["new","blogpost"],fields:[ | |
{name:"title",type:"text","class":"title"}, | |
{name:"body",type:"textarea","class":"body"} | |
] | |
} | |
}; | |
// now try |
This file contains 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("assembla.com") { | |
#header-w, #main-menu-w, .menu-wrapper { | |
background-color: #222 !important | |
} | |
ul#main-menu li, .more_tabs_menu_item { | |
background-color: #900 !important |
This file contains 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"?> | |
<Response> | |
<Say voice="woman">Hello world</Say> | |
<Play>http://www.radiolovers.com/shows/J/Journeytothecenteroftheearth/Lost.mp3</Play> | |
</Response> |
This file contains 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
diff --git a/private/protocol/restxml/restxml.go b/private/protocol/restxml/restxml.go | |
index 65faeae..27e0e86 100644 | |
--- a/private/protocol/restxml/restxml.go | |
+++ b/private/protocol/restxml/restxml.go | |
@@ -8,7 +8,10 @@ package restxml | |
import ( | |
"bytes" | |
"encoding/xml" | |
+ "fmt" | |
"io" |
This file contains 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
FROM alpine | |
RUN apk add --no-cache curl | |
ENTRYPOINT curl -sf --unix-socket /var/run/docker.sock -H "Content-Type: application/json" -X GET http:/v1.39/events |