Skip to content

Instantly share code, notes, and snippets.

@alexmuller
alexmuller / drone.md
Last active August 29, 2015 14:13
Drone examples
@alexmuller
alexmuller / git-commit.md
Created January 2, 2015 23:11
My vim cheat sheet
  • Split the window: ctrl + w, s
  • Move between splits ctrl + w, ctrl + w
  • Page down: ctrl + f
  • Page up: ctrl + b
{
"data": [
{
"_day_start_at": "2014-04-07T00:00:00+00:00",
"_end_at": "2014-04-14T00:00:00+00:00",
"_hour_start_at": "2014-04-07T00:00:00+00:00",
"_id": "MjAxNC0wNC0wN1QwMDowMDowMCswMDowMF8yMDE0LTA0LTE0VDAwOjAwOjAwKzAwOjAw",
"_month_start_at": "2014-04-01T00:00:00+00:00",
"_quarter_start_at": "2014-04-01T00:00:00+00:00",
"_start_at": "2014-04-07T00:00:00+00:00",
{"trim": false, "value-attribute": "rating", "axis-period": "month"}
@alexmuller
alexmuller / index.markdown
Last active August 29, 2015 14:11
Converting the `user_satisfaction_graph` to use transforms

Converting the user_satisfaction_graph to use transforms

Raw datum that we store:

{
  "_day_start_at": "2014-03-10T00:00:00+00:00",
  "_hour_start_at": "2014-03-10T00:00:00+00:00",
  "_id": "20140310_apply-carers-allowance",
 "_month_start_at": "2014-03-01T00:00:00+00:00",
Ubuntu 12.04.2 LTS
Ubuntu 12.04.2 LTS
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-70-virtual x86_64)
* Documentation: https://help.ubuntu.com/
84 packages can be updated.
0 updates are security updates.
New release '14.04.1 LTS' available.
{
"entrypoint": "performanceplatform.collector.webtrends.reports",
"data-set": {
"data-group": "foo",
"data-type": "bar"
},
"query": {
"report_id": "alphanumeric-string"
},
"options": {
@alexmuller
alexmuller / grouped_timeseries_update.py
Created October 30, 2014 10:34
Grouped timeseries with added "count"
from stagecraft.apps.dashboards.models.module import ModuleType
grouped_timeseries = ModuleType.objects.get(name='grouped_timeseries')
new_json = {u'definitions': {u'axis': {u'type': u'object', u'properties': {u'label': {u'required': True, u'type': u'string'}, u'key': {u'oneOf': [{u'type': u'string'}, {u'type': u'array'}], u'required': False}, u'format': {u'oneOf': [{u'type': u'string'}, {u'type': u'object', u'properties': {u'type': {u'type': u'string'}}}]}}}}, u'$schema': u'http://json-schema.org/draft-03/schema#', u'allOf': [{u'definitions': {u'query-params': {u'type': u'object', u'properties': {u'start_at': {u'required': False, u'type': u'string'}, u'period': {u'allOf': [{u'required': False}, {u'enum': [u'hour', u'day', u'week', u'month', u'quarter'], u'type': u'string'}]}, u'filter_by': {u'items': {u'type': u'string'}, u'required': False, u'type': u'array'}, u'collect': {u'items': {u'pattern': u':(sum|mean|set|count)$', u'type': u'string'}, u'required': False, u'type': u'array'}, u'group_by': {u'oneOf':
["_at", index: 6, input: "_start_at"]
@alexmuller
alexmuller / disks.diff
Created October 7, 2014 13:40
Multiple disks in Vagrant and VirtualBox
diff --git a/Vagrantfile b/Vagrantfile
index 88c7485..0118176 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -115,6 +115,9 @@ Vagrant.configure("2") do |config|
modifyvm_args << "--memory" << "1024"
end
vb.customize(modifyvm_args)
+ file_to_disk = './tmp/large_disk.vdi'
+ vb.customize ['createhd', '--filename', file_to_disk, '--size', 512]