This file has been truncated, but you can view the full file.
This file contains 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
op-web | D, [2024-06-04T10:50:39.098499 #1379] DEBUG -- : [fd8d63bd-dd73-4987-a616-7b02dfb92892] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."type" IN ($1, $2, $3, $4) AND "users"."type" NOT IN ($5, $6, $7) AND "users"."status" = $8 AND "users"."id" = $9 LIMIT $10 [["type", "User"], ["type", "SystemUser"], ["type", "DeletedUser"], ["type", "AnonymousUser"], ["type", "SystemUser"], ["type", "AnonymousUser"], ["type", "DeletedUser"], ["status", 1], ["id", 167], ["LIMIT", 1]] | |
op-web | D, [2024-06-04T10:50:39.100341 #1379] DEBUG -- : [fd8d63bd-dd73-4987-a616-7b02dfb92892] Setting Maximum (0.5ms) SELECT MAX("settings"."updated_at") FROM "settings" | |
op-web | I, [2024-06-04T10:50:39.102264 #1379] INFO -- : [fd8d63bd-dd73-4987-a616-7b02dfb92892] OpenProject User: ####### ####### ([email protected] ID: 167 <[email protected]>) | |
op-web | D, [2024-06-04T10:50:39.107159 #1379] DEBUG -- : [fd8d63bd-dd73-4987-a616-7b02dfb92892] Storages::Storage Load (2.6ms) SELECT "storages".* FROM "storages" |
This file contains 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
extensions = ['*.MOV', '*.MP4', '*.JPG', '*.DNG', '*.SRT'] | |
dir_list = Dir.glob(extensions) | |
dir_list.map{|f| date = File.mtime(f).strftime('%F'); Dir.mkdir(date) unless Dir.exist?(date); FileUtils.mv(f, date)} |
This file contains 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
a = [0, 1, 2, 3, 4, 5] | |
# example 1 | |
def reverse(array) | |
array.each_with_index do |val, index| | |
break if index >= array.count / 2 | |
temp = array[index] | |
array[index], array[-index-1] = array[-index-1], temp | |
end |
This file contains 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
#!/bin/sh | |
sudo chown -R foxweb:foxweb ./* | |
find . -name "*" -type d -print0 | xargs -0 /bin/chmod 755 | |
find . -name "*" -type f -print0 | xargs -0 /bin/chmod 644 | |
find . -name ".DS_Store" -type f -print0 | xargs -0 /bin/rm | |
find . -name "._*" -type f -print0 | xargs -0 /bin/rm | |
find . -name ".AppleDouble" -type d -print0 | xargs -0 /bin/rm -rf |
This file contains 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
class GpsParser | |
def initialize(file_path) | |
@file_path = file_path | |
end | |
def converted_gps | |
return if raw_exif_data.empty? | |
{ | |
latitude: float_gps(:GPSLatitude, :GPSLatitudeRef), |
This file contains 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
require 'benchmark' | |
n = 100_000 | |
abc = ('A'..'Z').to_a | |
Benchmark.bm do |x| | |
x.report { n.times { rand(65..90).chr } } | |
x.report { n.times { rand('A'.ord..'Z'.ord).chr } } | |
x.report { n.times { ('A'..'Z').to_a.sample } } | |
x.report { n.times { abc.sample } } |
This file contains 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
Style/FrozenStringLiteralComment: | |
EnforcedStyle: never | |
Layout/AccessModifierIndentation: | |
EnforcedStyle: outdent | |
Layout/EmptyLinesAroundAccessModifier: | |
Enabled: false | |
Layout/ExtraSpacing: |
This file contains 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
swagger: '2.0' | |
info: | |
version: '1.0' | |
title: Nightingale API | |
description: Перед вами документация по Nightingale API (система управления контентом). Пока API без версионирования. Звёздочками отмечены обязательные поля. В двойных фигурных {{скобках}} указаны переменные, заданные в environment. | |
host: example.com | |
basePath: / | |
schemes: | |
- http | |
consumes: |
This file contains 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
2017-07-10 13:54:32 +0300: Rack app error: #<Faraday::ConnectionFailed> | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:641:in `rescue in connection_for' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:589:in `connection_for' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:994:in `request' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http_persistent.rb:25:in `perform_request' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http_persistent.rb:21:in `with_net_http_connection' | |
/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in |
This file contains 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
0x9f9263e8a207de5f4a102cfcf02ee87e463bcc4d |
NewerOlder