This plugin allows you to directly include HTML templates into a Javascript file.
Given the following template:
template.html
import static org.junit.Assert.*; | |
import java.util.Iterator; | |
import java.util.NoSuchElementException; | |
import org.junit.Before; | |
import org.junit.Test; | |
public class DequeTest { | |
private Deque<String> deque; |
module.exports = function denodify(fn) { | |
return function() { | |
var self = this; | |
var args = Array.prototype.slice.call(arguments); | |
return new Promise(function(resolve, reject) { | |
args.push(function(error, result) { | |
error ? reject(error) : resolve(result); | |
}); |
var http = require("http"); | |
var fs = require("fs"); | |
var mime = require("mime-types"); | |
var server = http.createServer(function(req, res) { | |
var path = "." + req.url; | |
fs.stat(path, function(error, stats) { | |
if (error) { | |
res.writeHead(404); |
(def fib-seq | |
((fn fib [a b] (cons a (lazy-seq (fib b (+ b a))))) 1 1)) |
#!/usr/bin/env ruby | |
require "rubygems" | |
require "codeplane" | |
require "optparse" | |
Codeplane.configure do |config| | |
ARGV.options do |opts| | |
opts.on("-u", "--user=username", String) { |val| config.username = val } | |
opts.on("-p", "--api-key=key", String) { |val| config.api_key = val } |
Run with while true; do clear; ruby a.rb | tee b.rb; sleep 1; mv -f b.rb a.rb; done
(function(angular) { | |
function underlineToCamelCase(string) { | |
return string.replace(/(\_[a-z])/g, function(match) { | |
return match.toUpperCase().replace("_", ""); | |
}); | |
} | |
function convertToCamelCaseObject(object) { | |
if (typeof object != "object") return object; | |
require "socket" | |
require "openssl" | |
require "thread" | |
require "thwait" | |
require "benchmark" | |
require "optparse" | |
require "net/http" | |
require "csv" | |
require "uri" |