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
if (e instanceof KeyboardEvent) { | |
if (e.keyCode != keys.ENTER) { | |
return; | |
} | |
} |
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
try { | |
List<IdmDataItem> additionalRequestItems = this.request.getRequestData().getAdditionalData().getItem(); | |
} catch(NullPointerException e) { | |
List<IdmDataItem> additionalRequestItems = new List<IdmDataItem>(); | |
} |
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
input { | |
amqp { | |
auto_delete => false | |
durable => true | |
exchange => "router" | |
exclusive => false | |
format => "json" | |
host => "loggingqueue.dev" | |
passive => false | |
password => "pword" |
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
$data = []; | |
$data['first_name'] = $this->params()->fromPost('first_name', ''); | |
$data['last_name'] = $this->params()->fromPost('last_name', ''); | |
$form = $this->getUserService()->getUserForm(); | |
$form->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods); | |
$form->bind($user); | |
$form->setData($data); | |
\Zend\Debug\Debug::dump($form->get('user_auth_email')->getValue()); |
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
filter { | |
grok { | |
type => 'apache-error' | |
pattern => "\[%{DATA:timestamp}\] \[%{WORD:loglevel}\] \[%{WORD:originator} %{IP:clientip}\] %{GREEDYDATA:errmsg}" | |
add_tag => "apache" | |
} | |
date { | |
type => "apache-error" | |
timestamp => "%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}" | |
} |
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 projects::queuesystem::butts( | |
$jarbase = 'https://logstash.objects.dreamhost.com/release', | |
$jarfile = 'logstash-1.1.13-monolithic.jar', | |
$jarpath = "/tmp/$jarfile", | |
$jdk = 'openjdk-7-jre-headless', | |
$installpath = '/opt/logstash' | |
) { | |
Exec { path => '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin'} |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
} | |
output { | |
elasticsearch { | |
embedded => false | |
host => "localhost" | |
} |
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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.deb | |
sudo dpkg -i elasticsearch-0.90.0.deb |
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
$sharedEvents = $e->getTarget()->getServiceManager()->get('SharedEventManager'); | |
$sharedEvents->attach('Zend\Mvc\Application', 'dispatch.error', function ($event){ | |
//do magic | |
}); |
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
$output = fopen("php://output",'w') or die("Can't open php://output"); | |
header("Content-Type:application/csv"); | |
header("Content-Disposition:attachment;filename=pressurecsv.csv"); | |
fputcsv($output, ['email','status','created on', 'end date', 'last logged in', 'sales email']); | |
foreach($contentArray as $content) { | |
fputcsv($output, $content); | |
} | |
fclose($output) or die("Can't close php://output"); | |
exit; |