Skip to content

Instantly share code, notes, and snippets.

View heijmerikx's full-sized avatar

Rutger Heijmerikx heijmerikx

View GitHub Profile
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,
# If you are running more than one instances of graylog2-server you have to select one of these
# instances as master. The master will perform some periodical tasks that non-masters won't perform.
is_master = true
# The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
# to use an absolute file path here if you are starting graylog2-server from init scripts or similar.
node_id_file = /etc/graylog2-server-node-id
# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
# Generate one by using for example: pwgen -s 96
'use strict';
angular.module('reusableThings')
.directive('fileDropzone', () ->
restrict: 'A'
scope: {
file: '='
fileName: '='
}
link: (scope, element, attrs) ->
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@heijmerikx
heijmerikx / Capistrano-Deployment-Recipe.rb
Created October 16, 2012 08:54 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@heijmerikx
heijmerikx / forcessl.rb
Created February 23, 2012 12:39 — forked from dodeja/forcessl.rb
Root Domain to WWW redirection in Rails 3.1 before forcing SSL on Heroku
# in config/environments/production.rb
# config.force_ssl = true
# config.middleware.use "Forcessl"
# Make sure redirection happens before forcing ssl
# config.middleware.insert_before 'Rack::SSL', 'Forcessl'
# in lib/forcessl.rb
# change *. to your domain
class Forcessl
@heijmerikx
heijmerikx / gist:1456523
Created December 10, 2011 21:33
Nederlandse lijst van landen in haml markup.
=f.select :country, ["Afghanistan",
"Albanië",
"Algerije",
"Amerikaanse Overzeese eilanden",
"Andorra",
"Angola",
"Anguilla",
"Antartica",
"Antigua",
"Argentinië",
@heijmerikx
heijmerikx / gist:1446468
Created December 8, 2011 08:37
JWplayer javascrip embed code in haml, including custom logo configuration.
#vc
Loading player...
:javascript
jwplayer("vc").setup({
flashplayer: "#{asset_path 'jwplayer/player.swf'}",
file: "#{@video.path}_site.mp4",
image: "http://#{APP_CONFIG['bucket_name']}.s3.amazonaws.com/#{@thumb}/site/frame_0004.png",
height: 375,
width: 700,
streamer: "rtmp://#{APP_CONFIG['cloudfront_url_video']}/cfx/st",
@heijmerikx
heijmerikx / gist:1261118
Created October 4, 2011 08:05
MySQL FIND_IN_SET to Postgresql...
def self.order(ids)
# The postgresql way
update_all(["position = STRPOS(?, ','||id||',')", ",#{ids.join(',')},"], { :id => ids })
# the mysql way
# update_all(['position = FIND_IN_SET(id, ?)', ids.join(',')],{ :id => ids })
end