Skip to content

Instantly share code, notes, and snippets.

View tanordheim's full-sized avatar

Trond Nordheim tanordheim

View GitHub Profile
["command1", "command2", "command3"].each do |command|
execute command do
not_if { File.directory?("/usr/bin") }
end
end
conn = PG::Connection.new(host: "localhost", dbname: "test")
conn.exec("SELECT * FROM table") do |result|
result.each do |row|
puts row["id"]
end
end
@tanordheim
tanordheim / gist:4943716
Last active December 13, 2015 16:58
aesh-output.txt
[test]$ deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.jar
======>"deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.jar"
[test]$ deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.jar←8
======>"deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.jar"
[test]$ deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.jar
======>"deploy C:\APPS\JBoss\jboss-as-7.x.nightly.30-01-2013.manageclinic\custom_osgi_packages\org.springframework.jdbc-3.1.3.RELEASE.j"
@tanordheim
tanordheim / gist:4943668
Created February 13, 2013 10:26
maven install output
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.aesh.cl.BuilderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec
Running org.jboss.aesh.cl.CommandLineFormatterTest
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.03 sec <<< FAILURE!
Running org.jboss.aesh.cl.CommandLineParserTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.jboss.aesh.cl.ParseCompleteObjectTest
<Block Name="ModelBase" FullName="Uno.Content.ModelBase" Modifiers="public" Type="Block">
<MetaProperties>
<MetaProperty Name="Time" FullName="Time" DataType="Uno.Double" />
<MetaProperty Name="BoundingSphere" FullName="BoundingSphere" DataType="Uno.Geometry.Sphere" />
<MetaProperty Name="BoundingBox" FullName="BoundingBox" DataType="Uno.Geometry.Box" />
<MetaProperty Name="StartTime" FullName="StartTime" DataType="Uno.Double" />
<MetaProperty Name="EndTime" FullName="EndTime" DataType="Uno.Double" />
<MetaProperty Name="model_Transform" FullName="model_Transform" DataType="Uno.Float4x4" />
<MetaProperty Name="model_Time" FullName="model_Time" DataType="Uno.Double" />
<MetaProperty Name="World" FullName="World" DataType="Uno.Float4x4" />
ip nat pool testpool <local ip> <local ip> netmask 255.255.255.0 type rotary
ip nat inside destination list 100 pool testpool
access-list 100 permit tcp any any range <start> <end>
[
{
"duration": 10,
"template_id": null,
"id": "22551946-b608-11e1-a0da-009b1464001c",
"elements": [
{
"position": {
"x": 2,
"y": 2
Input:
G1: Result1, Result2, Result3, Result4
G2: Result5, Result6, Result7, Result8
G3: Result9
Output:
G1: Result1, Result2, Result3
G2: Result4, Result5, Result6
G3: Result7, Result8, Result9
$('.modal').modal('hideModal');
$('.modal, .modal-backdrop').remove();
<% if ticket.errors.any? -%>
$("<%= escape_javascript(render('form')) %>").modal();
<% else -%>
if ($('table.tickets[data-milestone-id]').length > 0) {
// Milestone ticket list.
var milestoneId = $('table.tickets[data-milestone-id]').attr('data-milestone-id');
@tanordheim
tanordheim / gist:1691573
Created January 27, 2012 23:31
MongoDB multiple sort fields
> db.users.ensureIndex({instance_id: 1, first_name: 1, last_name: 1});
> db.users.find({ instance_id: ObjectId("4f22b9cf7e298452c5000001") }).sort({first_name: 1, last_name: 1}).explain()
{
"cursor" : "BtreeCursor instance_id_1_first_name_1_last_name_1",
"nscanned" : 2,
"nscannedObjects" : 2,
"n" : 2,
"millis" : 0,
"nYields" : 0,
"nChunkSkips" : 0,