Skip to content

Instantly share code, notes, and snippets.

View tibra's full-sized avatar

Tim Brandes tibra

View GitHub Profile
@tibra
tibra / gist:7774c5f1c24f627927a2d89c929b2c24
Created February 6, 2018 10:46
Pagerduty Sensu Handler
#!/opt/sensu/embedded/bin/ruby
#
# This handler creates and resolves PagerDuty incidents, refreshing
# stale incident details every 30 minutes
#
# Copyright 2011 Sonian, Inc <chefs@sonian.net>
#
# Released under the same terms as Sensu (the MIT license); see LICENSE
# for details.
#
<!--
\begin{figure}[htbp]
\centering
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{1pt}%
\fbox{\includegraphics[keepaspectratio,width=\textwidth,height=\dimexpr\textheight-2\baselineskip\relax]{../Grafiken/Grafik_Beispielmodell_E-Learning.jpg}}
\caption{ITP-Lernprozess mit dynamischen Testverfahren}
\label{grafik_e_learning}
\end{figure}
-->
\documentclass[12pt,a4paper,oneside,bibtotocnumbered,liststotocnumbered,pointlessnumbers,DIV=calc,BCOR=16mm]{scrreprt}
% ==========================================
% = My modifications to the LaTeX template =
% ==========================================
\usepackage[nosectionbib]{apacite}
%use line breaks instead of indentation
\usepackage[parfill]{parskip}
@tibra
tibra / gist:bc5c533b74cc91b3e552
Last active January 12, 2016 11:28
Psql Scope
scope :in_month, -> (month, year) { where("(extract(month from start_time) = ?) AND (extract(year from start_time) = ?)", month, year) }
# @Sebastian: service nginx start|stop|restart|reload
upstream report_production {
server unix:/home/report_production/application/shared/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 8008;
server_name report.projektserver3.as.wiwi.uni-goettingen.de;
@tibra
tibra / gist:2789713
Created May 25, 2012 18:36
Output of sm deploy
__rvm_load_rvmrc:10: array parameter rvm_rvmrc_files created globally in function
__rvm_load_rvmrc:10: array parameter rvm_rvmrc_files created globally in function
/home/cuvillier/.rvm/scripts/initialize:58: array parameter rvm_rvmrc_files created globally in function
__rvm_load_project_config:58: scalar parameter rvm_previous_environment created globally in function
__rvm_load_project_config:59: scalar parameter rvm_current_rvmrc created globally in function
Deploy started at 2012-05-25T203334
[ ] update_repository ( shared/cuvillier )... __rvm_load_rvmrc:10: array parameter rvm_rvmrc_files created globally in function
__rvm_load_rvmrc:10: array parameter rvm_rvmrc_files created globally in function
/home/cuvillier/.rvm/scripts/initialize:58: array parameter rvm_rvmrc_files created globally in function
/home/cuvillier/.rvm/hooks/after_use:3: array parameter after_use_hooks created globally in function
@tibra
tibra / gist:2786994
Created May 25, 2012 09:41
SM Deploy RVM scalar parameters error
__rvm_load_project_config:59: scalar parameter rvm_previous_environment created globally in function
__rvm_load_project_config:60: scalar parameter rvm_current_rvmrc created globally in function
Deploy started at 2012-05-25T114009
[ ] update_repository ( shared/cuvillier )... /home/cuvillier/.rvm/hooks/after_use:3: array parameter after_use_hooks created globally in function
__rvm_load_project_config:9: scalar parameter rvm_previous_environment created globally in function
__rvm_load_project_config:10: scalar parameter rvm_current_rvmrc created globally in function
rvm:27: scalar parameter disk_version created globally in function
__rvm_parse_args:378: scalar parameter gemset_name created globally in function
__rvm_ruby_string:57: scalar parameter rvm_ruby_repo_url created globally in function
__rvm_ruby_string:58: scalar parameter rvm_ruby_repo_branch created globally in function
@tibra
tibra / gist:1589113
Created January 10, 2012 13:35
Nginx config with Unicorn and Rails 3.1
upstream example {
server unix:/home/example/shared/example.sock fail_timeout=0;
}
server {
listen 80;
server_name example.com;
client_max_body_size 100M;
@tibra
tibra / rails_3_1_beta_1_changes.md
Created May 21, 2011 18:13 — forked from ryanb/rails_3_1_rc4_changes.md
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 Beta 1

  • The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]

  • jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]

  • Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]

  • The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]