This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def name | |
raise DeprecationError if user.present? | |
super | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Metrics/LineLength: | |
Max: 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1] pry(main)> VoucherDecorator | |
=> VoucherDecorator | |
[2] pry(main)> VoucherDecorator.new | |
ArgumentError: wrong number of arguments (0 for 1..2) | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/draper-2.1.0/lib/draper/decorator.rb:30:in `initialize' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bash-4.1$ identify -verbose Bakje_Mie.psd | |
Image: Bakje_Mie.psd | |
Format: PSD (Adobe Photoshop bitmap) | |
Class: DirectClass | |
Geometry: 2361x2350+0+0 | |
Resolution: 150x150 | |
Print size: 15.74x15.6667 | |
Units: PixelsPerInch | |
Type: ColorSeparationAlpha | |
Endianess: Undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bar = 1 | |
def foo | |
bar = 2 | |
end | |
foo() | |
puts bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v() { | |
vagrant_commands=(box connect destroy global-status halt help init login package plugin provision rdp reload resume share ssh ssh-config status suspend up version) | |
if [[ ${vagrant_commands[(r)$1]} == $1 ]] | |
then | |
vagrant $* | |
else | |
vagrant ssh -c "$*" | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88617:20140901:085700.967 Starting Zabbix Server. Zabbix 2.2.5 (revision 47411). | |
88617:20140901:085700.967 ****** Enabled features ****** | |
88617:20140901:085700.967 SNMP monitoring: YES | |
88617:20140901:085700.967 IPMI monitoring: YES | |
88617:20140901:085700.968 WEB monitoring: YES | |
88617:20140901:085700.968 VMware monitoring: YES | |
88617:20140901:085700.968 Jabber notifications: YES | |
88617:20140901:085700.968 Ez Texting notifications: YES | |
88617:20140901:085700.968 ODBC: YES | |
88617:20140901:085700.968 SSH2 support: YES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT row_number FROM ( | |
SELECT row_number() OVER (ORDER BY created_at NULLS LAST) AS row_number, id | |
FROM posts | |
WHERE user_id = 123 | |
ORDER BY created_at | |
) posts | |
WHERE posts.id = 3 | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> select * from intervals; | |
+----+----------+----------+ | |
| id | start | end | | |
+----+----------+----------+ | |
| 1 | 15:30:00 | 16:20:00 | | |
| 2 | 10:00:00 | 13:00:00 | | |
| 3 | 15:00:00 | 16:09:00 | | |
| 4 | 11:00:00 | 14:00:00 | | |
| 5 | 16:20:00 | 16:30:00 | | |
| 6 | 09:00:00 | 14:00:00 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link_to :sort => column, :direction => direction do | |
[ | |
title, | |
tag(:span, :class => (direction == "asc" ? "glyphicon glyphicon-chevron-up" : "glyphicon glyphicon-chevron-down")) | |
].inject(&:+) | |
end |
NewerOlder