Skip to content

Instantly share code, notes, and snippets.

View CGenie's full-sized avatar
💭
I prefer sourcehut! sr.ht

CGenie

💭
I prefer sourcehut! sr.ht
View GitHub Profile
@CGenie
CGenie / urls.py
Created October 8, 2014 15:22
urls.py proposal
def test():
return ReleaseCollectionHandler
urls = (
...
r'/test/test/?$',
@CGenie
CGenie / openstack.yaml
Last active August 29, 2015 14:07
openstack.yaml with implemented roles
---
- &base_release
model: "nailgun.release"
fields:
state: "available"
modes_metadata:
ha_compact:
description: "This configuration Deploys OpenStack ready for high availability (HA). Controller services are prepared for HA by setting up a base MySQL/Galera, RabbitMQ and HAProxy so that additional controllers can be deployed NOW, or scaled out LATER. 3 or more controllers are required for a true HA environment."
multinode:
description: "In this configuration the OpenStack controller is deployed separately from the compute and cinder nodes. This mode assumes the presence of 1 controller node and 1 or more compute/cinder nodes. You can add more nodes to scale your cloud later."
@CGenie
CGenie / openstack.yaml
Last active August 29, 2015 14:07
openstack.yaml proposal
roles_metadata:
controller:
conflicts:
- compute
conditions:
- condition: "cluster:mode == 'multinode'"
then:
all:
- condition: "selectedNodes._length <= 1"
warning: "Multi-node environment cannot have more than one controller node."
@CGenie
CGenie / docker_inspect
Created October 7, 2014 10:18
Strange docker inspect behavior
docker inspect fuel/nailgun_6.0:latest
"config": {
"Hostname": "f218e5ce70a0",
"Domainname": "",
"User": "",
"Memory": 0,
"MemorySwap": 0,
"CpuShares": 0,
"AttachStdin": false,
@CGenie
CGenie / console.html
Created August 12, 2014 10:23
Selenium Firefox console log
<html>
<head>
<script type="text/javascript">
console.log('TEST TEST');
window.dump('DUMP DUMP');
console.error('ERROR ERROR');
</script>
</head>
<body>
@CGenie
CGenie / gist:7884f53b2386d74c164b
Created August 11, 2014 17:21
Data.Aeson.Lens problems
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson.Lens
import Data.Text
import Data.Text.Encoding as E
main = do
lex x = (E.decodeUtf8 "{\"a\": 1}") ^? key "a"
return ()