Skip to content

Instantly share code, notes, and snippets.

View nickmarden's full-sized avatar

Nick Marden nickmarden

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nickmarden on github.
  • I am nick_marden (https://keybase.io/nick_marden) on keybase.
  • I have a public key whose fingerprint is 3663 55B8 098A 711C 350F 8549 8D82 F04B C7A0 B5D1

To claim this, I am signing this object:

@nickmarden
nickmarden / nginx_init.sls
Created September 29, 2014 23:31
My nginx state file
nginx:
pkg:
- installed
nginx-config:
file:
- managed
- name: /etc/nginx/nginx.conf
- source: salt://conf/nginx/nginx.conf
- user: nginx
include:
- nginx
# ...
jenkins-http-proxy:
file:
- managed
- template: jinja
- name: /etc/nginx/conf.d/nginx-proxy-jenkins.conf
nginx:
pkg:
- installed
nginx-config:
file:
- managed
- name: /etc/nginx/nginx.conf
- source: salt://conf/nginx/nginx.conf
- user: nginx
# Copyright (c) 2013, StrongLoop, Inc. <callback@strongloop.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@nickmarden
nickmarden / gist:1498254
Created December 19, 2011 18:20
Running the paperclip-spike migrations and accessing paperclip-enabled models afterward
[nick@nick-mba paperclip-spike] (master)$ bundle exec rake db:migrate
== PaperclipMeta: migrating ==================================================
-- add_column(:uploaded_images, :img_meta, :text)
-> 0.0315s
...
== PaperclipMeta: migrated (0.0772s) =========================================
== PaperclipifyUploadedImages: migrating =====================================
-- execute("CREATE TABLE attachment_fu_uploaded_images_backup AS SELECT * FROM uploaded_images")
-> 0.0219s
--- src/searchd.cpp.orig 2010-05-10 23:49:13.000000000 +0100
+++ src/searchd.cpp 2010-05-10 23:52:03.000000000 +0100
@@ -10224,7 +10224,11 @@
g_iClientTimeout = hSearchd["client_timeout"].intval();
if ( hSearchd.Exists ( "max_children" ) && hSearchd["max_children"].intval()>=0 )
+ {
g_iMaxChildren = hSearchd["max_children"].intval();
+ if ( g_iMaxChildren > 0 )
+ g_iPreforkChildren = g_iMaxChildren;
#!/bin/bash -x
rm -fr $HOME/elasticsearch
mkdir -p $HOME/elasticsearch
mkdir -p $HOME/elasticsearch/data
mkdir -p $HOME/elasticsearch/logs
cp -p config/travis/elasticsearch-client.yml config/elasticsearch.yml
cat config/elasticsearch.yml
sed "s#__HOME__#$HOME#g;" config/travis/elasticsearch-server.yml > $HOME/elasticsearch/elasticsearch.yml
cat $HOME/elasticsearch/elasticsearch.yml
sed "s#__HOME__#$HOME#g;" config/travis/elasticsearch.sh > $HOME/elasticsearch/elasticsearch.sh
test:
endpoint: http://localhost:9201
cluster.name: travis
node.name: travis-node
node.max_local_storage_nodes: 1
index.number_of_shards: 1
index.number_of_replicas: 0
index.mapper.dynamic: true
action.auto_create_index: true
action.disable_delete_all_indices: true
path.conf: __HOME__/elasticsearch
path.data: __HOME__/elasticsearch/data