In your Gemfile:
gem 'activerecord-jdbc-adapter'
gem 'jdbc-mariadb'
In your database.yml
development:
adapter: mariadb
require 'rubygems' | |
require 'find' | |
require 'haml' | |
require 'haml/html' | |
Find.find("content") do |path| | |
if path.end_with? "htm" | |
File.open(path) do |input| | |
File.open(path + "l.haml", "w") do |output| | |
output.write Haml::HTML.new(input.read).render |
/* Traditional bean */ | |
public class Bean { | |
private String foo; | |
private String bar; | |
private int baz; | |
public Bean() { | |
} | |
public Bean(String foo, String bar, int baz) { |
In your Gemfile:
gem 'activerecord-jdbc-adapter'
gem 'jdbc-mariadb'
In your database.yml
development:
adapter: mariadb
import com.google.gson.Gson; | |
import java.security.MessageDigest; | |
public class GsonTest { | |
private final byte[] sha1; | |
public GsonTest(byte[] sha1) { | |
this.sha1 = sha1; | |
} |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'net.sf.proguard:proguard-gradle:5.2' | |
} | |
} |
$ java -jar ./build/libs/jruby-dropwizard-service-1.0+7c593cf.jar | |
usage: java -jar jruby-dropwizard-service-1.0+7c593cf.jar | |
[-h] [-v] {server,check} ... | |
positional arguments: | |
{server,check} available commands | |
optional arguments: | |
-h, --help show this help message and exit | |
-v, --version show the application version and exit |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --cipher-suite-blacklist=0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x002D,0x0032,0x0033,0x0038,0x0039,0x0040,0x0044,0x0045,0x0063,0x0065,0x0066,0x0067,0x006A,0x006B,0x0087,0x0088,0x008E,0x008F,0x0090,0x0091,0x0099,0x009A,0x009E,0x009F,0x00A2,0x00A3,0x00AA,0x00AB,0x00B2,0x00B3,0x00B4,0x00B5 |
function DeadMansSwitchGmailCheckIn() { | |
var messages = Gmail.Users.Messages.list("me", { q: "from: [email protected] label:unread" }); | |
if (messages.messages && messages.messages.length > 0) { | |
Logger.log(UrlFetchApp.fetch("Your Snitch URL")); | |
for (var i = 0; i < messages.messages.length; i++) { | |
var message = messages.messages[i]; | |
Gmail.Users.Messages.modify({"removeLabelIds": ["UNREAD"]}, "me", message.id); | |
} |
const Content = require(“../models/content”); | |
const PdfApi = require('some-pdf-service-api-client'); | |
PdfApi.configure(process.env.PDF_API_KEY); | |
modules.export = { | |
generate: function(contentId) { | |
const content = Content.find(contentId); | |
return PdfApi.render(content.format()); | |
} |
// Factory | |
function createPdfGenerator(Content, PdfApi) { | |
return { | |
generate: function(contentId) { | |
const content = Content.find(contentId); | |
return PdfApi.render(content.format()); | |
} | |
}; | |
} |