Skip to content

Instantly share code, notes, and snippets.

View philips's full-sized avatar
👨‍💻
at the keebs

Brandon Philips philips

👨‍💻
at the keebs
View GitHub Profile
r.db('roller').table('app_event').filter(function(event) {
return event("DateTime").minutes().eq(15);
}).count
Return 52
r.db('roller').table('app_event').groupedMapReduce(
function(event) { return event('DateTime').minutes(); },
function(event) { return 1; },
function(acc, event) { acc.add(1); return acc; }, r.expr(0))
r.db('roller').table('app_event').groupedMapReduce(
function(event) { return event('DateTime').minutes(); },
function(event) { return 1; },
function(acc, count) { return acc.add(count); }, 0)
$ docker run busybox echo foo
2014/02/19 02:12:37 Error: create: create: command not found
core@localhost ~ $ docker run -i -t busybox exit 1
2014/02/19 02:14:00 Unable to locate exit
[error] client.go:2279 Error getting size: bad file descriptor
core@localhost ~ $ echo $?
0
This causes rethink to eat 100% cpu:
r.db('roller').table('app_event').groupedMapReduce(
r.js('(function(row) { return row.Version })'),
function(event) { return 1; },
function(acc, count) { return acc.add(count); }, 0)
RqlRuntimeError: Cannot convert javascript `undefined` to ql::datum_t. in:
r.db("roller").table("app_event").groupedMapReduce(r.js("this.Version"), function(var_12) { return 1; }, function(var_13) { return var_13.add(var_14); }, {base: 0})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@philips
philips / gist:9108489
Last active August 29, 2015 13:56
Howto get an ssh agent forwarded into your vagrant host.

Setup your ssh client so it can ssh into your vagrant machine like a regular host:

vagrant ssh-config --host coreos-vagrant >> ~/.ssh/config
vagrant ssh-config --host coreos-vagrant | sed -n "s/IdentityFile//gp" | xargs ssh-add

Login! Using 'ssh -A' forwards an agent from your host machine into your vagrant machine.

@philips
philips / gist:9339210
Last active August 29, 2015 13:56
How to destroy your disk or make it rw
rootfs=/dev/xvda3
ro_compat_offset=$((0x464 + 3))
printf '\000' | sudo dd of="${rootfs}" seek=$((offset + ro_compat_offset)) \
conv=notrunc count=1 bs=1
systemctl enable --runtime /media/state/units/docker-local.service
systemctl daemon-reload
systemctl start docker-local
Instructions for trying ext4+overlay with docker! In an up-to-date SDK:
Write the following to /build/amd64-usr/etc/portage/package.keywords/overlay
sys-kernel/coreos-sources
sys-kernel/coreos-kernel
sys-fs/btrfs-progs
app-emulation/docker
In src/scripts make the following change to switch to ext4:
#cloud-config
coreos:
units:
- name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Description=Docker Socket for the API
Greetings, openSUSE fans! We have another development release ready for your testing pleasure. openSUSE 11.1 beta 5 is now available for immediate download and testing.
You may have noticed that we were scheduled to release RC 1 today. However, as Stephan Kulow mentioned on openSUSE-Factory list [1] on Tuesday, we have several blocker bugs and 11 P1 bugs still present. While we're ready to do another release today, we decided that it wasn't ready to be called a release candidate. This shouldn't push back the final release, but it will mean that we will only plan to have one public release candidate.
With just a little more than a month [2] before the public release on December 18th, there's still plenty to do. So, roll up your sleeves and start downloading!
Call for Testing
================
We all want openSUSE 11.1 to be the best release yet, and we need your help to get there. This release is ready for widespread testing, and we're encouraging everyone to download and test the beta releases.