Skip to content

Instantly share code, notes, and snippets.

View davewongillies's full-sized avatar

Dave Wongillies davewongillies

View GitHub Profile
@davewongillies
davewongillies / Running sentry under chaussette.md
Last active December 18, 2015 05:29
Running sentry under chaussette
  • In the home directory of the user that the sentry chausette process will run under: mkdir ~/.sentry
  • copy sentry.conf.py into ~/.sentry
  • running chaussette sentry.wsgi.application should be enough to get it started. Add options as required, eg:
chaussette sentry.wsgi.application --backend meinheld --port 8091

Here are the problems I was seeing

aboyd-laptop:Volumes aaronyo$ hdiutil attach -nomount -readwrite TimeCapsuleAaronLaptop/aboyd-laptop.sparsebundle
hdiutil: attach failed - Read-only file system

aboyd-laptop:TimeCapsuleAaronLaptop aaronyo$ hdiutil attach -nomount aboyd-laptop.sparsebundle/
/dev/disk2            Apple_partition_scheme         	
/dev/disk2s1        	Apple_partition_map            	
/dev/disk2s2        	Apple_HFSX                     	
aboyd-laptop:TimeCapsuleAaronLaptop aaronyo$ fsck_hfs -f /dev/disk2
@davewongillies
davewongillies / gist:5855425
Last active December 18, 2015 22:38
Installing graphite-web into a virtualenv with circus and chaussette
# virtualenv graphite-web
# cd graphite-web
# . bin/activate
# pip install circus chaussette meinheld Django==1.3 Twisted==11.1.0 python-memcached==1.47 txAMQP==0.4 simplejson==2.1.6 django-tagging==0.3.1 gunicorn pytz pyparsing==1.5.7 http://cairographics.org/releases/py2cairo-1.8.10.tar.gz git+git://github.com/graphite-project/whisper.git#egg=whisper
# pip install git+git://github.com/graphite-project/graphite-web.git --install-option="--prefix=$VIRTUALENV_PREFIX/graphite-web" --install-option="--install-lib=$VIRTUALENV_PREFIX/graphite-web/lib/python2.7/site-packages"
@davewongillies
davewongillies / hp-scripting-toolkit-linux-9.40.md
Last active December 19, 2015 09:28
Running conrep from the HP Scripting Toolkit on 64-bit Ubuntu server

Running conrep from the HP Scripting Toolkit on 64-bit Ubuntu server

conrep from the HP Scripting Toolkit is used to make modifications to the system BIOS settings. To get it running on an 64-bit Ubuntu server, you'll need to install

  • libstdc++6:i386
  • libxml2:i386

Without it you'll get this error

$ ./conrep 
@davewongillies
davewongillies / How-to Use a serial connection to your Netgear ReadyNAS.md
Last active April 3, 2024 17:54
How-to: Use a serial connection to your Netgear ReadyNAS

Taken from http://damsteen.nl/blog/how-to-use-a-serial-connection-to-your-netgear-readynas as it always seems to be down

How-to: Use a serial connection to your Netgear ReadyNAS

It is possible to connect to the command-line interface of your Netgear ReadyNAS using a serial connection. I have seen a very old blog post on the internet describing how to connect via serial to a Infrant ReadyNAS NV but it wasn't very clear how to connect to a Netgear ReadyNAS NVX Pioneer Edition, which I have. I guess I'm not the only one who wants to connect to their ReadyNAS, so I'm sharing my knowlegde here :)

The obvious advantages of a serial connection to your ReadyNAS is that you can experiment with network settings without the fear of rendering your NAS inaccessible. I believe it is also possible to recover the firmware in the event an update fails, although I haven't tried this myself.

Requirements

@davewongillies
davewongillies / 0_reuse_code.js
Created October 4, 2013 05:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@davewongillies
davewongillies / Serving Django apps behind SSL with Nginx.md
Last active August 28, 2022 17:31 — forked from aj-justo/gist:3228782
Serving Django apps behind SSL with Nginx

Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:

server { 
    listen 443 default ssl;
    root /path/to/source;
    server_name mydomain;

    ssl_certificate      /path/to/cert;
    ssl_certificate_key  /path/to/key;
@davewongillies
davewongillies / OpenSSL Cheatsheet.md
Last active December 28, 2023 13:06
OpenSSL Cheatsheet

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
@davewongillies
davewongillies / create_graphite_user.py
Created January 6, 2014 23:57
create new graphite user
#!/usr/bin/env python
import os,sys
sys.path.append("<%= node['graphite']['doc_root']%>/graphite")
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.contrib.auth.models import User
username = sys.argv[1]
email = sys.argv[2]
password = sys.argv[3]
@davewongillies
davewongillies / gist:8697163
Last active July 14, 2019 04:54 — forked from pfreixes/gist:3187511
/etc/bash_completion.d/supervisorctl
# pfreixes, 2012-07-27
# Add to /etc/bash_completion.d/supervisorctl
_supervisor()
{
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"