This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class openssh::server { | |
package{'openssh-server': | |
ensure => present, | |
} | |
file{'/etc/ssh/sshd_config': | |
source => 'puppet:///modules/openssh/sshd_config', | |
owner => 'root', | |
group => 'root', | |
mode => '0444', | |
require => Package['openssh-server'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN CERTIFICATE----- | |
MIICNzCCAaCgAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwVzETMBEGCgmSJomT8ixk | |
ARkWA21wYzEUMBIGCgmSJomT8ixkARkWBHN0eHQxGDAWBgoJkiaJk/IsZAEZFghk | |
aXJzcnYwMTEQMA4GA1UEAxMHQ0EgY2VydDAgFw0xMjA4MDcwOTUxNDFaGA8yMDcy | |
MDgwNzA5NTE0MVowVzETMBEGCgmSJomT8ixkARkWA21wYzEUMBIGCgmSJomT8ixk | |
ARkWBHN0eHQxGDAWBgoJkiaJk/IsZAEZFghkaXJzcnYwMTEQMA4GA1UEAxMHQ0Eg | |
Y2VydDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApAAuH4UWx/L8UZavRjNl | |
wFELZOHnUjz8Zuhm/PkIqWDDuXLlC3zQcOp+YBbOB8+qrSha1TAuE67TuoKJ0dBX | |
uc4Sr4GMTrJDaPNBpB/va/V87iqJsbOV/u5HUYVc00gNaaIUnk6i/aDFewJmmiba | |
nQKyDLoBN33P2l3HpKwHVokCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%- | |
def flag(option, value) | |
if value.is_a(Boolean) | |
return '--' + (value ? 'enable' : 'disable') + option | |
else | |
return "--#{option} #{value}" | |
end | |
end | |
-%> | |
authconfig \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class site_varnish::server( | |
$type | |
) { | |
$target = "/etc/varnish/$type.conf" | |
concat{$target: | |
owner => root, | |
group => root, | |
mode => '0644', | |
} | |
Concat::Fragment <<| tag == 'varnish' |>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IdeaResource(ModelResource): | |
comments = fields.ToManyField('atizo.apps.ideas.api.IdeaCommentResource', 'ideacomment_set') | |
def override_urls(self): | |
return [ | |
url(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/children%s$" % (self._meta.resource_name, trailing_slash()), | |
self.wrap_view('get_children'), name="api_get_children" | |
), | |
] | |
def get_children(self, request, **kwargs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url(r'^(?P<platform_slug>[\w\-]+)/api/', include(ir.urls)), | |
url(r'^(?P<platform_slug>[\w\-]+)/api/', include(icr.urls)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IdeaCommentResource(ModelResource): | |
#ideas = fields.ForeignKey(IdeaResource, 'ideas') | |
class Meta(): | |
#authorization = Authorization() | |
resource_name = 'comments' | |
queryset = IdeaComment.objects.all() | |
class IdeaResource(ModelResource): | |
comments = fields.ToManyField(IdeaCommentResource, 'ideacomment_set') | |
#comments = fields.ToManyField('atizo.ideas.api.IdeaCommentResource', 'comments') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apps/ideas/urls.py: | |
url(r'^(?P<idea_project_id>\d+)/(?P<idea_project_slug>[\w\-]+)/idea/(?P<idea_id>\d+)/', include(ideacomment_resource.urls), name='idea-comments'), | |
apps/ideas/api.py: | |
class IdeaResource(ModelResource): | |
comments = fields.ToManyField('atizo.apps.ideas.api.IdeaCommentResource', 'comments') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function list_supporters() { | |
global $wpdb; | |
$wp_supporter_search = $wpdb->get_results(" | |
SELECT user_id | |
FROM $wpdb->usermeta | |
WHERE meta_value = '1' AND user_id != '60' | |
ORDER BY user_id | |
"); | |
foreach($wp_supporter_search as $supporter) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys, re, commands | |
from fabric.api import * | |
from fabric.contrib.console import * | |
from fabric.contrib.project import * | |
from fabric.contrib.files import contains, exists | |
import xmlrpclib | |
import pip | |
from itertools import izip_longest | |
from fabric.version import VERSION |