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
--- | |
resources: | |
- name: postgres | |
type: docker-image | |
source: | |
repository: postgres | |
tag: 9.6.2-alpine | |
- name: ruby | |
type: docker-image |
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
# Beware! This file is rewritten by htop when settings are changed in the interface. | |
# The parser is also very primitive, and not human-friendly. | |
fields=0 48 17 18 38 39 40 2 46 47 49 64 62 63 1 | |
sort_key=64 | |
sort_direction=1 | |
hide_threads=0 | |
hide_kernel_threads=1 | |
hide_userland_threads=0 | |
shadow_other_users=0 | |
show_thread_names=0 |
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
$cmd = $_CONF['rndc'] . " reload > /dev/null"; | |
system($cmd, $exit); | |
if ($exit != 0) { die($_CONF['rndc'] . " exit status " . $exit); } | |
$cmd = '/root/master2slave.sh'; | |
system($cmd, $exit); | |
if ($exit != 0) { die($_CONF['rndc'] . " exit status " . $exit); } |
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
ASD = { nested: { a: nil } } | |
# => {:nested=>{:a=>nil}} | |
b = ASD.clone | |
# => {:nested=>{:a=>nil}} | |
b[:nested][:a] = 'asd' | |
# => "asd" | |
b | |
# => {:nested=>{:a=>"asd"}} | |
ASD | |
# => {:nested=>{:a=>"asd"}} |
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 'rom-mapper' | |
require 'pp' | |
input = { | |
a: { | |
b: {}, | |
c: { | |
d: [ | |
{ | |
something: { |
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 MappingTest | |
MAPPING = { | |
passengers: ->(hash) { hash[:customer_info][:person_name] }, | |
flight_ticket_selling_carrier: :extract_services, | |
} | |
def results | |
response = api_call | |
res = {} | |
MAPPING.each do |attribute, extraction| |
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
AllCops: | |
Include: | |
- "**/*.gemspec" | |
- "**/*.podspec" | |
- "**/*.jbuilder" | |
- "**/*.rake" | |
- "**/*.opal" | |
- "**/Gemfile" | |
- "**/Rakefile" | |
- "**/Capfile" |
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
if Rails.env.production? | |
InfluxDB::Rails.configure do |config| | |
config.async = true | |
config.instrumentation_enabled = false | |
end | |
ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |name, started, finished, unique_id, payload| | |
log = { | |
http_status: payload[:status], | |
uri: payload[:path], |
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
node default { | |
yumrepo { "epel": enabled => 1 } | |
Package { require => Yumrepo['epel'] } | |
openvpn::server { 'winterthur': | |
country => 'CH', | |
province => 'ZH', | |
city => 'Winterthur', | |
organization => 'example.org', | |
email => 'root@example.org', |
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
map j scrollDown | |
map k scrollUp | |
map h scrollLeft | |
map l scrollRight |
NewerOlder