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
# Use rake --tasks | grep git for a list | |
# The most useful is rake git:checkin, which is essentially add + commit + message + push. | |
namespace :git do | |
desc "Run ssh-add to enter password for your ssh key a single time" | |
task :setup do | |
sh "ssh-add" | |
end |
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
!!! | |
%head | |
%title= content_for?(:title) ? yield(:title) : I18n.t("site_title") | |
%meta{:name => "description", :content=> "#{ content_for?(:description) ? yield(:description) : (I18n.t "site_description")}"} | |
%meta{:charset => "utf-8"} | |
%meta{:author => "John Lockwood"} | |
=stylesheet_link_tag "application", :media => "all" | |
=javascript_include_tag "application" | |
=csrf_meta_tags | |
= yield(:head) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title><%= content_for?(:title) ? yield(:title) : "Rails3 Mongoid Devise" %></title> | |
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Rails3 Mongoid Devise" %>"> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> |
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
mvn archetype:generate \ | |
-DarchetypeGroupId=org.apache.maven.archetypes \ | |
-DarchetypeArtifactId=maven-archetype-webapp \ | |
-DgroupId=com.codesolid.primefaces \ | |
-DartifactId=pom1 |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:h="http://java.sun.com/jsf/html"> | |
<h:head> | |
<title>JavaCodeGeeks</title> | |
</h:head> | |
<h:body> | |
<p><h:outputText value="#{helloWorldBean.msg}"/></p> |
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
# | |
# A proof of concept for an alternative to Flask-restful that supports GET (for an id) and GET (for a list of objects) on the same | |
# object -- not to mention POST (don't-know-the-id-yet) and PUT (sure I do). | |
# | |
# Usage in the file that defines the Blueprint looks like: | |
# api_v1_root = '/api/v1' | |
# v1_api = Blueprint('api/v1', __name__, url_prefix=api_v1_root) | |
# poc = ProofOfConcept("/poc") | |
# poc.register_routes(v1_api) |
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
/* | |
Well yes, this is awfully basic, but the real point is to see if we can embed it in | |
a Wordpress site and retain the syntax highlighting. | |
*/ | |
public class HelloWorld { | |
public static void main(String [] args) { | |
System.out.println("Hello world"); | |
} | |
} |
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
public class MyStepNameDialog extends BaseStepDialog implements StepDialogInterface { | |
// ... | |
/* | |
This example shows how to implement a help button in a PDI custom step dialog. This assumes | |
that you're including a docs directory in your deployment zip, with a help file in HTML format | |
named "MyStepName.html" |
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
"""AMI Lookup. | |
Given an AWS AMI ID and a region where that AMI is found, create a RegionMap | |
for use with Amazon CloudFormation. | |
Note it assumes your AWS credentials are set up according to the boto3 guide. | |
http://boto3.readthedocs.io/en/latest/guide/configuration.html. | |
TODO more error handling etc |
OlderNewer