Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@symroe
symroe / gist:7934495
Last active December 31, 2015 04:29
Party-hatify any web page!
<a href="javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement(&quot;script&quot;);c.type=&quot;text/javascript&quot;;c.src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/&quot;+g+&quot;/jquery.min.js&quot;;c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d==&quot;loaded&quot;||d==&quot;complete&quot;)){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,&quot;1.3.2&quot;,function($,L){$('img').each(function(i, el){
if (el['src'].indexOf('partyhatify') == -1) {
if (el.clientWidth >= 200 && el.clientHeight >= 200) {
$(el).attr('src', 'http://partyhatify.herokuapp.com/?src=' + el['src'])
}
}
});
});">Party-hatify!</a>
The 'promotion' system across envs is great for pushing new pillars 'up'
through the stacks (dev to stage to prod), however this can lead to a lot of
duplication, for example when there is a list of users in each env's pillar. Is
there a nice way to just append to the global variable?
For example, I might have a state that looks like this:
{% for name, user in pillar.get('users', {}).items() %}
[...add users...]
{% endfor %}
base:
'*':
- base.foo
'G@release_stage:demo':
- match: compound
- demo.foo
import math
UNITS_PER_EGG = 31.41
def get_area(radius):
return math.pi * radius * radius
def get_volume(radius, height):
area = get_area(radius);
return area*height
{
"fielding_in": [],
"other_officers": [],
"campaigns_officer": "None",
"registered_date": "2010-03-02T00:00:00",
"descriptions": [
{
"translation": "",
"description": "EN - Consult the people"
},
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
party 926
deregistered 683
the 610
for 344
independent 268
first 208
and 181
of 177
people 160
independents 155
> http://candidates.127.0.0.1.xip.io:3000/api/v0.1/organizations/party:117/image
> {'source': 'The Electoral Commission', 'notes': u'Emblem 1', 'id': u'125', 'mime_type': 'image/gif'}

< POST /api/v0.1/organizations/party:117/image 200 7.960 ms - 1140

< { [Error: MapperParsingException[object mapping for [organization] with array for [images] tried to parse as array, but got EOF, is there a mismatch in types for the same field?]]

ul,
ol {
list-style-type: none;
}
// Bulleted lists
.list-bullet {
list-style-type: disc;
margin-left: 20px;