Skip to content

Instantly share code, notes, and snippets.

/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
module Formtastic
module Inputs
module Base
module Html
def extra_html
template.content_tag(:div, Formtastic::Util.html_safe(extra_html_text),:class => (options[:extra_html_class] || 'extra-html')) if extra_html?
end
def extra_html?
extra_html_text.present? && !extra_html_text.kind_of?(Hash)
@er1c
er1c / gist:1448001
Created December 8, 2011 18:45
extra_html monkey patch for formtastic-bootstrap
module FormtasticBootstrap
module Inputs
module Base
module Html
def extra_html
template.content_tag(:div, Formtastic::Util.html_safe(extra_html_text),:class => (options[:extra_html_class] || 'extra-html')) if extra_html?
end
def extra_html?
extra_html_text.present? && !extra_html_text.kind_of?(Hash)
$(".resend_auth").live("click", (e)
e.preventDefault()
var link = $(this)
$.ajax({
url: link.attr("href"),
dataType: "json",
success: function(json) {
alert(json.msg)
}
@er1c
er1c / TestWCFBinaryXml.scala
Last active August 29, 2015 14:11
Scala Library for Decoding/Deserializing [MC-NBFX]: .NET Binary Format: XML Data Structure and [MC-NBFS]: .NET Binary Format: SOAP Data Structure
package fm.util
import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
import org.scalatest.{FunSuite, Matchers}
class TestWCFBinaryXml extends FunSuite with Matchers with Logging {
private val testDictionary: Map[Long, String] = Map[Long, String](
0l -> "str0",
4l -> "str4",
8l -> "str8",
/*
* Decompiled with CFR 0_110.
*
* Could not load the following classes:
* org.apache.commons.logging.Log
* org.apache.commons.logging.LogFactory
* org.apache.hadoop.conf.Configuration
* org.apache.hadoop.hive.serde2.SerDe
* org.apache.hadoop.hive.serde2.SerDeException
* org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
This file has been truncated, but you can view the full file.
[info] Loading project definition from /Users/eric/Work/fm-aaia/project
Installing the s3:// URLStreamHandler via java.net.URL.setURLStreamHandlerFactory
Creating a new Ivy URLHandlerDispatcher to handle s3:// URLs
[info] Set current project to fm-aaia (in build file:/Users/eric/Work/fm-aaia/)
[info] Updating {file:/Users/eric/Work/fm-aaia/}fm-aaia...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...

[info] Resolving com.frugalmechanic#fm-location_2.11;0.4.0-SNAPSHOT ...

[info] Resolving com.frugalmechanic#fm-location_2.11;0.4.0-SNAPSHOT ...
final protected def makeBreadcrumbs(ctx: SearchCtx)(implicit config: WebConfigCtx): Seq[Breadcrumb] = {
val breadCrumbs = Vector.newBuilder[Breadcrumb]
if (ctx.isNotEmpty || config.site.ui.header.showHomepageBreadcrumbOnEmptySearchCtx) breadCrumbs ++= HomepageBreadcrumb
if (ctx.isNotEmpty) breadCrumbs ++= ctx.breadcrumbs
breadCrumbs.result
}
{
"getVehiclesByVIN": {
"country": "SE",
"provider": 20367,
"lang": "de",
"vin": "WVWZZZ1KZ6W512579"
}
}

make -C web_api run_web_api_dependencies_datamarts 2>&1 | prepend_timestamps.sh | tee make.log