Skip to content

Instantly share code, notes, and snippets.

Tim Brandes tibra

View GitHub Profile
View gist:7774c5f1c24f627927a2d89c929b2c24
#!/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.
#
View gist:8b83698386f6b8193fb12a0567523f9f
<!--
\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}
-->
View gist:bc5c533b74cc91b3e552
scope :in_month, -> (month, year) { where("(extract(month from start_time) = ?) AND (extract(year from start_time) = ?)", month, year) }
@tibra
tibra / gist:ddb91a43857413f9009c
Created Jun 16, 2014
Include a LaTeX figure in Scrivener
View gist:ddb91a43857413f9009c
<!--
\begin{figure}[htbp]
\centering
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{1pt}%
\fbox{\includegraphics[keepaspectratio,width=\textwidth,height=\dimexpr\textheight-2\baselineskip\relax]{../Grafiken/Grafik_Diagnostik_Erkenntnisinteresse.jpg}}
\caption{Erkenntnisinteressen der Diagnostik}
\label{grafik_diagnostik_erkenntnisinteresse}
\smallskip
\footnotesize
View Report Nginx Config
# @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
Output of sm deploy
View gist:2789713
__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
SM Deploy RVM scalar parameters error
View gist:2786994
__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
View my-thesis-footer
View my-thesis-input
\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:1589113
Created Jan 10, 2012
Nginx config with Unicorn and Rails 3.1
View gist:1589113
upstream example {
server unix:/home/example/shared/example.sock fail_timeout=0;
}
server {
listen 80;
server_name example.com;
client_max_body_size 100M;
You can’t perform that action at this time.