Skip to content

Instantly share code, notes, and snippets.

# [email protected] in ~/Projects/rax on git:master x [19:10:00]
$ rails s
=> Booting Puma
=> Rails 6.0.0.beta3 application starting in development
=> Run `rails server --help` for more startup options
[email protected]: autoload set for EmailValidator, to be loaded from /Users/jan/Projects/rax/app/validators/email_validator.rb
[email protected]: autoload set for IssuesEvent, to be loaded from /Users/jan/Projects/rax/app/models/events/issues_event.rb
[email protected]: autoload set for CreateEvent, to be loaded from /Users/jan/Projects/rax/app/models/events/create_event.rb
[email protected]: autoload set for PlanChannel, to be loaded from /Users/jan/Projects/rax/app/channels/plan_channel.rb
[email protected]: autoload set for ApplicationCable, to be autovivified from /Users/jan/Projects/rax/app/channels/application_cable
# frozen_string_literal: true
class Settings::AvatarsController < SettingsController
before_action :set_person
before_action :set_avatar
def create
@avatar = @person.avatar || Avatar.new(user: current_user)
@avatar.update avatar_params.merge(crop_x: nil, crop_y: nil, crop_width: nil, crop_height: nil)
# [email protected] in ~/Projects/rax on git:master x [19:12:41]
$ rails s
=> Booting Puma
=> Rails 6.0.0.beta3 application starting in development
=> Run `rails server --help` for more startup options
[email protected]: autoload set for EmailValidator, to be loaded from /Users/jan/Projects/rax/app/validators/email_validator.rb
[email protected]: autoload set for IssuesEvent, to be loaded from /Users/jan/Projects/rax/app/models/events/issues_event.rb
[email protected]: autoload set for CreateEvent, to be loaded from /Users/jan/Projects/rax/app/models/events/create_event.rb
[email protected]: autoload set for PlanChannel, to be loaded from /Users/jan/Projects/rax/app/channels/plan_channel.rb
[email protected]: autoload set for ApplicationCable, to be autovivified from /Users/jan/Projects/rax/app/channels/application_cable
class ClaimBroadcastJob < ApplicationJob
queue_as :default
def perform(claim)
message = "#{claim.user.name} just claimed a desk!"
ActionCable.server.broadcast "activity_channel", user_id: claim.user.id, message: message
end
end
input {
udp {
host => "0.0.0.0"
buffer_size => 32768
port => 5228
codec => json_lines
}
}
output {
### Keybase proof
I hereby claim:
* I am habermann24 on github.
* I am habermann24 (https://keybase.io/habermann24) on keybase.
* I have a public key whose fingerprint is 1440 951A 98CB 6940 AD35 4CDF D386 1C5D C6DC 34A5
To claim this, I am signing this object:
\usepackage{nomencl}
% Rename command to \abk instead of \nomenclature
\let\abk\nomenclature
% German title for list of abbreviations
% \renewcommand{\nomname}{Abkürzungsverzeichnis}
% Distance between abbreviation and explanation
\setlength{\nomlabelwidth}{.20\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
% Smaller line spacing
%\setlength{\nomitemsep}{-3.5pt}%-\parsep}
@haberbyte
haberbyte / gist:11295921
Created April 25, 2014 16:48
Figure - Subfigure
\begin{figure}[h]
\makebox[\linewidth][c]{%
\begin{subfigure}[b]{.6\textwidth}
\centering
Figure 1
\caption{5 feasible network states}
\end{subfigure}%
\begin{subfigure}[b]{.6\textwidth}
\centering
Figure 2
# MODEL
class Case < ActiveRecord::Base
include Eventable
has_many :tasks
concerning :Assignment do
def assign_to(new_owner:, details:)
transaction do
<li><img src="img/portfolio/1.jpg" height="200"></li>
<li><img src="img/portfolio/2.jpg" height="200"></li>
<li><img src="img/portfolio/3.jpg" height="200"></li>
<li><img src="img/portfolio/4.jpg" height="200"></li>
<li><img src="img/portfolio/5.jpg" height="200"></li>
<li><img src="img/portfolio/6.jpg" height="200"></li>
<li><img src="img/portfolio/7.jpg" height="200"></li>
<li><img src="img/portfolio/8.jpg" height="200"></li>
<li><img src="img/portfolio/9.jpg" height="200"></li>
<li><img src="img/portfolio/10.jpg" height="200"></li>