Skip to content

Instantly share code, notes, and snippets.

View victorhooi's full-sized avatar

Victor Hooi victorhooi

View GitHub Profile
@victorhooi
victorhooi / homebrew_graphviz
Created September 8, 2011 12:41
Homebrew - Graphviz fails to compile - make[3]: *** No rule to make target `-lltdl', needed by `libgvc.la'. Stop.
victors-macbook-pro:Downloads victorhooi$ brew install -v graphviz
==> Downloading http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz
File already downloaded in /Users/victorhooi/Library/Caches/Homebrew
/usr/bin/tar xf /Users/victorhooi/Library/Caches/Homebrew/graphviz-2.28.0.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/graphviz/2.28.0 --with-qt=no --disable-quartz --disable-java --disable-ocaml --disable-perl --disable-php --disable-python --disable-r --disable-ruby --disable-sharp --disable-swig
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/graphviz/2.28.0 --with-qt=no --disable-quartz --disable-java --disable-ocaml --disable-perl --disable-php --disable-python --disable-r --disable-ruby --disable-sharp --disable-swig
checking build system type... x86_64-apple-darwin11.1.0
checking host system type... x86_64-apple-darwin11.1.0
checking for a BSD-compatible install... /usr/bin/install -c
checking
@victorhooi
victorhooi / django-cms-css.css
Created December 15, 2011 23:29
Django-CMS CSS
@charset "utf-8";
/**
* @author: Angelo Dini
* @copyright: http://www.divio.ch under the BSD Licence
*/
/*##################################################|*/
/* #TOOLBAR# */
#cms_toolbar { position:absolute; left:0; top:0; z-index:99999; width:100%; } /* needs ie fix for pos fixed */
.cms_toolbar { position:fixed; left:0; top:0; z-index:99999; width:100%; } /* needs ie fix for pos fixed */
@victorhooi
victorhooi / django-cms-toolbar.html
Created December 15, 2011 23:30
Django-CMS HTML
<div id="cms_toolbar" class="cms_reset" style="display:none;">
<!-- start: toolbar -->
<div class="cms_toolbar">
<div id="cms_toolbar-toggle">
<a href="#" class="cms_toolbar-btn cms_toolbar-btn_left">
<span class="cms_toolbar-btn_right cms_toolbar_icon-toggle">
<span class="cms_toolbar_icon">&nbsp;</span>
</span>
</a>
</div>
@victorhooi
victorhooi / gist:1495261
Created December 19, 2011 03:33
Logstash Sender Configuration
input {
file {
debug => false
path => "/var/log/*.log"
format => "plain" # What's the recommendation here?
type => "varlogs"
}
}
output {
@victorhooi
victorhooi / gist:1495262
Created December 19, 2011 03:34
Logstash Receiver Configuration
input {
amqp {
debug => true
durable => true
exchange_type => "topic"
format => "plain"
host => "localhost"
key => "*"
name => "e1"
password => "guest"
@victorhooi
victorhooi / gist:1504426
Created December 21, 2011 03:29
Building Graylog2 - Unable to find syslog4j JAR
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.syslog4j:syslog4j:jar:0.9.46
Try downloading the file manually from the project website.
@victorhooi
victorhooi / gist:1505071
Created December 21, 2011 07:26
Graylog2-server 0.9.96 - Error with MongoDB
21/12/2011 6:06:20 PM com.mongodb.DBTCPConnector fetchMaxBsonObjectSize
WARNING: Exception determining maxBSON size using0
java.io.IOException: couldn't connect to [HOSTNAME/10.180.3.6:27017] bc:java.net.ConnectException: Connection refused
at com.mongodb.DBPort._open(DBPort.java:228)
at com.mongodb.DBPort.go(DBPort.java:112)
at com.mongodb.DBPort.go(DBPort.java:93)
at com.mongodb.DBPort.findOne(DBPort.java:146)
at com.mongodb.DBPort.runCommand(DBPort.java:157)
at com.mongodb.DBTCPConnector.fetchMaxBsonObjectSize(DBTCPConnector.java:457)
at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:444)
@victorhooi
victorhooi / syslog.log
Created December 22, 2011 03:36
Ubuntu - Continually switching back from Static IP to DHCP
Dec 22 06:40:50 null-000c2997e7a1z dhclient: DHCPREQUEST of 10.180.3.220 on eth0 to 10.180.64.5 port 67
Dec 22 06:40:50 null-000c2997e7a1z dhclient: DHCPACK of 10.180.3.220 from 10.180.64.5
Dec 22 06:40:50 null-000c2997e7a1z dhclient: can't create /var/lib/dhcp3/dhclient.eth0.leases: No such file or directory
Dec 22 06:40:50 null-000c2997e7a1z dhclient: bound to 10.180.3.220 -- renewal in 3362 seconds.
Dec 22 07:17:01 null-000c2997e7a1z CRON[23213]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 22 07:36:52 null-000c2997e7a1z dhclient: DHCPREQUEST of 10.180.3.220 on eth0 to 10.180.64.5 port 67
Dec 22 07:36:52 null-000c2997e7a1z dhclient: DHCPACK of 10.180.3.220 from 10.180.64.5
Dec 22 07:36:52 null-000c2997e7a1z dhclient: can't create /var/lib/dhcp3/dhclient.eth0.leases: No such file or directory
Dec 22 07:36:52 null-000c2997e7a1z dhclient: bound to 10.180.3.220 -- renewal in 3190 seconds.
Dec 22 08:17:01 null-000c2997e7a1z CRON[23284]: (root) CMD ( cd / && run-parts --report /etc/cron.hour
@victorhooi
victorhooi / gist:1581217
Created January 9, 2012 05:02
Django 1.4 and Sentry - Timezone Error
[09/Jan/2012 15:57:26] "GET /sasdfasdf HTTP/1.1" 500 59
Unable to process log entry: can't subtract offset-naive and offset-aware datetimes
Traceback (most recent call last):
File "/home/victorhooi/.virtualenvs/aegnexus/src/sentry/sentry/manager.py", line 322, in from_kwargs
group, is_new, is_sample = self._create_group(event, **group_kwargs)
File "/home/victorhooi/.virtualenvs/aegnexus/src/sentry/sentry/manager.py", line 366, in _create_group
silence_timedelta = date - group.last_seen
TypeError: can't subtract offset-naive and offset-aware datetimes
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
@victorhooi
victorhooi / gist:1581222
Created January 9, 2012 05:04
Django 1.4 and Sentry - Timezone Error - settings.py
# Django settings for testsentry project.
#DEBUG = True
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Victor Hooi', 'my_email'),
)