Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
@drscream
drscream / gist:6329969
Created August 24, 2013 19:30
add resolvers to an existing smartos zone, that doesn't work
echo '{ "add_resolvers": [ "8.8.8.8", "8.8.4.4" ] }' | vmadm update 652f002f-4a24-46bc-a698-23d262b459c5
echo '{ "update_resolvers": [ "8.8.8.8", "8.8.4.4" ] }' | vmadm update 652f002f-4a24-46bc-a698-23d262b459c5
echo '{ "resolvers": [ "8.8.8.8", "8.8.4.4" ] }' | vmadm update 652f002f-4a24-46bc-a698-23d262b459c5
@drscream
drscream / conf.d unicorn.redmine
Last active December 23, 2015 04:19
Gentoo Redmine Unicorn: The `unicorn.redmine` file should be created as `unicorn` file in `/etc/init.d/`. After that you should symlink the file to the correct app name, for example to `unicorn.redmine`. Create a configuration file in `/etc/conf.d/` that should be named as the app name.
## /etc/conf.d/unicorn
## Project directory where the ruby files are located
PROJECT_DIR="/local/sites/com/<something>/redmine"
## User which unicorn will run (Default: unicorn)
PROJECT_USER="redmine"
## Project name only be used for identification (Default: service name)
#PROJECT_NAME=""
user www www;
worker_processes 1;
events {
# After increasing this value You probably should increase limit
# of file descriptors (for example in start_precmd in startup script)
worker_connections 1024;
}
http {
12/10/2013 21:16:38 :: Error writing to /opt/graphite/storage/whisper/frickel/random/diceroll.wsp
12/10/2013 21:16:38 :: Unhandled Error
Traceback (most recent call last):
File "/opt/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 172, in _worker
result = context.call(ctx, function, *args, **kwargs)
File "/opt/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/opt/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
File "/opt/graphite/lib/carbon/writer.py", line 149, in writeForever
@drscream
drscream / sickbeard-init.solaris11
Created October 14, 2013 18:08
Sickbeard SMF diff for SmartOS
--- init.solaris11.orig 2013-10-14 18:04:43.238109596 +0000
+++ init.solaris11 2013-10-14 18:07:49.886298548 +0000
@@ -63,6 +63,9 @@
<!-- execute as user sickbeard -->
<method_context>
<method_credential user='sickbeard' group='other' />
+ <method_environment>
+ <envvar name='PATH' value='/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin'/>
+ </method_environment>
</method_context>
#
#
#
EVENT bgpEstablished .1.3.6.1.2.1.15.7.1 "Status Events" Normal
FORMAT The BGP Established event is generated when $*
SDESC
The BGP Established event is generated when
the BGP FSM enters the ESTABLISHED state.
Variables:
1: bgpPeerLastError
#!/bin/bash
# Certificate Signing Request Generator
# be safe about permissions
LASTUMASK=$(umask)
umask 077
# OpenSSL for HPUX needs a random file
RANDOMFILE=${HOME}/.rnd
Couldn't find matching metrics: TransportError(400, u'IndexAlreadyExistsException[[graphite_metrics] already exists]')
Traceback (most recent call last):
File "/opt/graph-explorer/app.py", line 400, in render_graphs
(query, targets_matching) = s_metrics.matching(query)
File "/opt/graph-explorer/structured_metrics/__init__.py", line 307, in matching
self.assure_index()
File "/opt/graph-explorer/structured_metrics/__init__.py", line 172, in assure_index
self.es.indices.create(index='graphite_metrics', body=body)
File "/opt/graph-explorer/structured_metrics/elasticsearch-py/elasticsearch/client/utils.py", line 70, in _wrapped
return func(*args, params=params, **kwargs)
#!/usr/bin/bash
## Load configuration information from USBKey
. /lib/svc/share/smf_include.sh
. /lib/sdc/config.sh
load_sdc_sysinfo
load_sdc_config
## Set the PATH environment because of other commands in /usr
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='site:postboot'>
<service
name='site/postboot'
type='service'
version='1'>
<create_default_instance enabled='true' />
<single_instance />