Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Hounddog / ls
Last active August 29, 2015 14:19
Logstash
ubuntu@ip-10-0-0-162:/etc/logstash$ ls -al
total 18856
drwxrwxr-x 3 root root 4096 Apr 17 20:03 .
drwxr-xr-x 115 root root 4096 Apr 17 14:00 ..
-rwxrwxrwx 1 root root 19296245 Apr 17 20:03 GeoLiteCity.dat
drwxrwxr-x 2 root root 4096 Apr 17 20:32 conf.d
@Hounddog
Hounddog / elasticsearch-connection
Created April 21, 2015 18:34
logstash debugging
ubuntu@ip-10-0-0-23:~$ curl -XGET '10.0.0.215:9200'
{
"status" : 200,
"name" : "Joey Bailey",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.4.4",
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
"build_timestamp" : "2015-02-19T13:05:36Z",
"build_snapshot" : false,
@Hounddog
Hounddog / config
Created April 28, 2015 10:59
nginx filter passzord
# Custom logstash format
log_format logstash '$http_host '
'$remote_addr [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$temp_request_body" '
'$request_time '
'$upstream_response_time';
@Hounddog
Hounddog / Data
Last active August 29, 2015 14:24
{
"_index":"cards",
"_type":"card",
"_id":"1",
"_score":1.0,
"_source":{
"id":2,
"givenName":"Bob",
"familyName":"Singor",
"honorificSuffixes":null,
@Hounddog
Hounddog / countrieslist.js
Created July 28, 2015 14:14
phonenumber formatting and paging for sitemap
angular.module('elephone.data.countriesList', []).value('countriesList', [
{lang: "it-IT", code: 'IT', name: 'ITALY', phoneCode: '+39', host: "elephone.it"},
{lang: "fr-FR", code: 'FR', name: 'FRANCE', phoneCode: '+33', host: "elephone.fr"},
{
lang: "nl-NL",
code: 'NL',
name: 'NETHERLANDS',
phoneCode: '+31',
host: "elephone.nl",
phoneNumberFormats: [
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx-frontend
labels:
name: nginx-frontend
spec:
replicas: 1
selector:
name: nginx-frontend
apiVersion: v1
kind: Service
metadata:
name: ci-jenkins
labels:
name: ci-jenkins
spec:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
#type: LoadBalancer
'doctrine-hydrator' => array(
'product' => array(
'entity_class' => 'doctrine.entity',
'object_manager' => 'doctrine.entitymanager.orm_default',
'by_value' => true,
'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',
'strategies' => array(
'category' => 'Application\Hydrator\EmbeddedEntityStrategy',
)
),
if(isset($postContent["body"])) {
$postContent["body"] = $this->sanitizeCSS($postContent["body"]);
}
switch( strtolower( $action )){
case 'publish':
try{
$post = $objXMLRPClientWordPress->uploadPost( $postContent );
$dossier->ExternalId = $post['postid'];
@Hounddog
Hounddog / hosts
Last active September 21, 2016 12:29
[development]
10.160.143.3
[production]
10.160.143.3