This file contains hidden or 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
protected static T CreateRoutedEventArgs<T>() { | |
var fakeCommand = Substitute.For<ICommand>(); | |
var nonPublicInstance = BindingFlags.NonPublic | BindingFlags.Instance; | |
var ev = (RoutedEvent) Activator.CreateInstance( | |
type: typeof(RoutedEvent), | |
bindingAttr: nonPublicInstance, | |
binder: null, | |
args: new object[4] {null, null, null, null }, | |
culture: null); | |
var args = (T) Activator.CreateInstance( |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
Script to open a sqlite3 database and dump all user tables to CSV files. | |
Tested in Unicode-rich environment. | |
Usage: | |
dumpsqlite3tocsv foo.db | |
""" | |
import sqlite3, csv, codecs, cStringIO, os, os.path |
This file contains hidden or 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
err: /Stage[main]/Rabbitmq::Server/Package[rabbitmq-server]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install rabbitmq-server' returned 100: Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following extra packages will be installed: | |
erlang-asn1 erlang-base erlang-corba erlang-crypto erlang-docbuilder | |
erlang-edoc erlang-eunit erlang-ic erlang-inets erlang-inviso erlang-mnesia | |
erlang-nox erlang-odbc erlang-os-mon erlang-parsetools erlang-percept | |
erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssh erlang-ssl | |
erlang-syntax-tools erlang-tools erlang-webtool erlang-xmerl libltdl7 | |
libsctp1 lksctp-tools odbcinst odbcinst1debian1 unixodbc |
This file contains hidden or 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
I, [2012-04-13 00:42:21#21996] INFO -- received: #<Qrack::Transport::Method:0xde81d48 @channel=0, @payload=#<Qrack::Protocol::Connection::Start:0x36673c9f @mechanisms="PLAIN AMQPLAIN", @server_properties={:capabilities=>{}, :copyright=>"Copyright (C) 2007-2012 VMware, Inc.", :information=>"Licensed under the MPL. See http://www.rabbitmq.com/", :platform=>"Erlang/OTP", :product=>"RabbitMQ", :version=>"2.8.1"}, @version_minor=0, @locales="en_US", @version_major=8>> | |
I, [2012-04-13 00:42:21#21996] INFO -- send: #<Qrack::Transport::Method:0x3efe0ce | |
9 @channel=0, @payload=#<Qrack::Protocol::Connection::StartOk:0x1901b54e @client_properties={:platform=>"Ruby", :product=>"Bunny", :information=>"http://github.com/ruby-amqp/bunny", :version=>"0.7.8"}, @response={:LOGIN=>"log_pusher", :PASSWORD=>"5adffb33ed2807d12234a6c75be9d022"}, @locale="en_US", @mechanism="AMQPLAIN">> | |
I, [2012-04-13 00:42:21#21996] INFO -- received: #<Qrack::Transport::Method:0x2ed4a1d3 @channel=0, @payload=#<Qrack::Protocol::Connection::Tune:0x |
This file contains hidden or 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
class elasticsearch { | |
# ... | |
file { "/etc/elasticsearch/elasticsearch.yml": | |
ensure => present, | |
source => ["puppet:///files/site-elasticsearch/${fqdn}/elasticsearch.yml", | |
"puppet:///files/site-elasticsearch/elasticsearch.yml", | |
"puppet:///modules/elasticsearch/elasticsearch.yml"], | |
owner => root, | |
group => root, | |
} |
This file contains hidden or 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
# Original recipe by niallo: https://gist.github.com/2003430 | |
# Full Puppet module: https://github.com/garthk/puppet-chrislea | |
# | |
# Adjustments: | |
# * Fixed operation on Ubuntu with sources.list.d in /etc/apt | |
# * Fixed operation on Ubuntu with current add-apt-repository entry filenames | |
# * Broke out chrislea definition for repository creation | |
# * Set timeout=3600 for apt-get, which can be slow | |
# * Avoided apt-get update if it's been done once since add-apt-repository | |
# * Broke out zeromq |
This file contains hidden or 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
class bbb($bbb_hostname = $fqdn, $salt = "d34db33fba5eba11f01dab1e5ca1ab1e") { | |
exec { "dist upgrade": | |
refreshonly => true, | |
command => "/usr/bin/apt-get dist-upgrade", | |
} | |
exec { "update and dist upgrade": | |
refreshonly => true, | |
command => "/usr/bin/apt-get update", | |
notify => Exec["dist upgrade"], | |
} |
This file contains hidden or 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
java.lang.NullPointerException | |
at org.apache.jsp.demo1_jsp.getJoinURL(demo1_jsp.java:199) | |
at org.apache.jsp.demo1_jsp._jspService(demo1_jsp.java:889) | |
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) | |
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) | |
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) | |
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) |
This file contains hidden or 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
root@spike-112:/opt# apt-get install bbb-record-core | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following NEW packages will be installed: | |
bbb-record-core | |
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 0B/22.6kB of archives. | |
After this operation, 258kB of additional disk space will be used. | |
(Reading database ... 88342 files and directories currently installed.) |
This file contains hidden or 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
root@26797-2-1051166:/etc# apt-get -f install | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
Correcting dependencies... Done | |
The following packages were automatically installed and are no longer required: | |
linux-headers-2.6.32-39-generic linux-headers-2.6.32-28 linux-headers-2.6.32-39 | |
linux-headers-2.6.32-28-generic | |
Use 'apt-get autoremove' to remove them. | |
The following extra packages will be installed: |