Skip to content

Instantly share code, notes, and snippets.

View jippi's full-sized avatar

Christian Winther jippi

View GitHub Profile
@jippi
jippi / sites.yaml
Last active December 10, 2015 03:38
# A Records:
dns::record::a {
"dns":
zone => "local.officecloud.dk",
data => ["192.168.1.10"];
"web":
zone => "local.officecloud.dk",
data => ["192.168.1.20"];
"db":
zone => "local.officecloud.dk",
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index 3d76a4d..00e7b59 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -95,13 +95,21 @@ class UsersProject < ActiveRecord::Base
def user_bulk_import(user, project_ids, project_access)
UsersProject.transaction do
+ has_keys = user.keys.count > 0
project_ids.each do |project_id|
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index 3d76a4d..00e7b59 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -95,13 +95,21 @@ class UsersProject < ActiveRecord::Base
def user_bulk_import(user, project_ids, project_access)
UsersProject.transaction do
+ has_keys = user.keys.count > 0
project_ids.each do |project_id|
$php_version = '5.4.11-1~dotdeb.0'
class {
'php::cli':
version => $php_version;
'php::apache':
version => $php_version;
'php::dev':
version => $php_version;
'php::pear':
@jippi
jippi / unblock-us-netflix.sh
Last active December 14, 2015 04:59
NB: This only works on OS X !! download raw; chmod +x unblock-us-netflix.sh; ./unblock-us-netflix.sh on | off
#!/bin/sh
# Set up DNS configuration using resolver on OS X
#
# Requires one argument, the domain to point to unblock-us service
#
function setUp() {
if [ -z "$1" ]
then
echo "setup :: missing first argument (domain)"
@jippi
jippi / composer.json
Last active December 18, 2015 03:18
Build files for travis a @lorenzo's cakephp-sqs plugin sqs aws
{
"require" : {
"aws/aws-sdk-php": "2.*"
}
}
input {
file {
path => "/var/log/apache2/access.log.json"
format => json_event
type => apache
}
}
filter {
geoip {
input {
file {
path => "/var/log/apache2/access.log.json"
format => json_event
type => apache
}
}
filter {
geoip {
input {
file {
path => "/var/log/apache2/access.log.json"
format => json_event
type => apache
}
}
filter {
geoip {
@jippi
jippi / logstash.conf
Created June 19, 2013 21:09
geo json using logstash - hack edition
input {
file {
path => "/var/log/apache2/access.log.json"
format => json_event
type => apache
}
}
filter {
geoip {