Skip to content

Instantly share code, notes, and snippets.

@rmoff
rmoff / gist:379e6ce46eb128110f38
Last active August 14, 2020 18:39
Kibana 3 and Elasticsearch 1.4 - CORS problem

Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin, but it misses out the important http.cors.enabled: true

Working config:

$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@gionn
gionn / lxc_mount_bind.md
Created November 21, 2013 16:49
How to enable bind mount inside lxc container

How to enable bind mount inside lxc container

When mount is returning:

STDERR: mount: block device /srv/database-data/postgres is write-protected, mounting read-only
mount: cannot mount block device /srv/database-data/postgres read-only

and dmesg shows:

@mattconnolly
mattconnolly / gist:6097313
Created July 28, 2013 03:58
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
# vmadm halt <uuid>
# zonecfg -z <uuid>
zonecfg:uuid> add dataset
zonecfg:uuid:dataset> set name=<zfs/path>
zonecfg:uuid:dataset> end
zonecfg:uuid> commit
zonecfg:uuid> exit
# zfs set mountpoint=legacy <zfs/path>
# vmadm boot <uuid>
@bdha
bdha / vbox_to_kvm.txt
Created March 1, 2012 04:04
Migrating from VirtualBox to KVM on ZFS
# It's important to convert the vbox image (VMDK or VDI or whatever) using
# the same version of VirtualBox that created it. You can try converting the image
# with qemu-img or kvm-img, but weird version mismatches will possibly make it not
# work.
# On your VirtualBox machine:
cd $VBOX_ROOT/$MACHINE_ROOT/
VBoxManage clonehd machine.vmdk machine.img --format RAW
scp machine.img root@kvm-host:/somewhere