makandra dev

``` def foo "hello!" end ``` def foo "hello!" end Lists * Bullet list item 1 * Bullet list item 2 Bullet list item 1 Bullet list item 2

...use + or - instead of *. 1. Numbered list item 2. Numbered list item 42. You don't need to number properly Numbered list item Numbered list item You don't need...

subject { 'foo' } it_behaves_like 'string equaling another string', 'foo' end RSpec 1 Use it_should_act_like from our spec_candy.rb (note the /behave/act/). It allows you to...

makandra Curriculum

...commit messages, they are only kept short here to fit inside the visualization. Exercise 1: Split up the most recent commit Head over to https://code.makandra.de/makandra/advanced-git-example-project and fork the...

github.com

...super, initialize might be hit with this error: ArgumentError: Wrong number of arguments (given 1, expected 0) Further readings https://github.com/makandra/active_type#activetypeobject

Easiest Way to Pick UI Colors 7 Rules for Creating Gorgeous UI (Part 1) 7 Rules for Creating Gorgeous UI (Part 2) Visual design rules you can safely follow...

...feeds, carriage returns, etc. There's a TC39 proposal that's stuck in Stage 1. While there is a /m modifier in Javascript, it only changes the meaning of ^ and...

...a selector. For example: .container .foo %span.my-selector .bar %div.my-selector .container > *:nth-child(1 of .my-selector) color: red Here, you specifically target the first element with the .my...

...grab the nth element of a certain type/tag. Browser Support https://caniuse.com/mdn-css_selectors_nth-last-child_of_syntax Chrome/Edge 111+ Firefox 113+ Safari 9+ Finding the last child matching a selector There is :nth-last...

stackoverflow.com

...def method_missing(method, *args, &block) if method.to_s =~ /play_(\w+)/ puts "Here's #{$1}" else super end end def respond_to?(method, *) method.to_s =~ /play_(\w+)/ || super end

DevOps Curriculum

...gedacht. Du kannst das nicht alles lesen: Gesamter TCP/IP Guide Ziele Was ist RFC 1918, welche Bereiche sind es und wofür sind diese? Du weißt, wofür man NAT verwendet und...

...wie es funktioniert Du kannst diesen TCP-Output erklären: 13:33:37.560666 ARP, Request who-has 10.0.1.42 tell 10.0.1.56, length 28 13:33:37.561108 ARP, Reply 10.0.1.42 is-at...

...production, since that's what's deployed. We want to delete images older than 10 days, except if they're deployed to production { "rules": [ { "rulePriority": 1, "description": "Keep image tagged...

"selection": { "tagPrefixList": ["production"], "tagStatus": "tagged", "countType": "imageCountMoreThan", "countNumber": 9999 }, "action": { "type": "expire" } }, { "rulePriority": 10, "description": "Expire tagged images older than 10 days", "selection": { "tagPrefixList": [ "history" ], "tagStatus": "tagged", "countType": "sinceImagePushed...

...monitoring route which returns a json looking like this: { "sidekiq": { "totals": { "failed": 343938, "processed": 117649167 }, "recent_history": { "failed": { "2016-11-06": 1...

} }, "queue_sizes": { "dead": 0, "retries": 0, "monitoring": 0, "low_priority": 0, "mails": 0, "default": 0, "elasticsearch": 0, "high_priority": 0, "file_upload": 0, "scheduled": 0 }, "active_workers": 0 },

...Fetching strscan-3.0.3.gem Building native extensions. This could take a while... Successfully installed strscan-3.0.3 1 gem installed gem list strscan *** LOCAL GEMS *** strscan (3.0.3, default: 3.0.1) Therefore is may happen...

...local database, transfer it to a server and import it in the server database. 1. export def dump_to_file(list) content = Base64.encode64(Marshal.dump(list.to_a)) file_path = File.expand_path...

...links to work on Gnome/Linux. Here is how it finally worked for me: Step 1: Add a Desktop launcher Add this file to ~/.local/share/applications/rubymine.desktop: [Desktop Entry] Version=1.0 Type=Application...

...to affect the whole container text, not separate children. For example, .container %p Text 1 %p Text 2 %p Text 3 with .container display: -webkit-box would be shown as...

exim -Mvc $messageid # print all frozen messages exiqgrep -z -i | xargs -n 1 exim -Mvc | less Delete frozen mails in the queue Maybe you should check which messages...

...network cards, try and match the driver to the interface name: $ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default...

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno1np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode...

getbootstrap.com

...look for another clockpicker or overwrite the styles by using bootstrap variables. Upgrade Phase 1 First you should include the new version into your project and replace the old imports...

...say you have a database schema where an Employee belongs_to :department: +-----------------+ | Employee | +------------+ |-----------------| n 1 | Department | | email |-------------------|------------+ | department_id | | name | +-----------------+ +------------+ Because of performance reason you decide to cache the department...

...s name into a new column Employee#department_name: +-----------------+ | Employee | +------------+ |-----------------| n 1 | Department | | email |-------------------|------------+ | department_id | | name | | department_name | +------------+ +-----------------+ You add the column like this: ALTER TABLE employees ADD COLUMN...

...with "INFO" in green: tail -f /path/to/log | sed --unbuffered -e 's/\(.*INFO.*\)/\o033[32m\1\o033[39m/' -e 's/\(.*FATAL.*\)/\o033[31m\1\o033[39m/' Here are the most common...

...by setting the left and right margins to auto, for example: // SASS $container_width: 100px .container width: $container_width margin: 0 auto However, this won’t work on an absolutely...

...positioned element. But there is a solution: // SASS $container_width: 100px .container width: $container_width position: absolute left: 50% margin-left: floor($container_width...

...row.insertBefore imageTemplate # Prepare the template to be cloned for the next image increaseTemplateIndices: -> # E.g. ("[1]", "1") -> "[2]" increase = (match, $1) -> match.replace $1, parseInt($1) + 1 imageTemplate.find('input').each -> $input = $(this...

# @return: The progress bar element addProgressBar: (element) -> progressBar = $(' ').addClass('image--progress').css 'width', '100%' progressBar.appendTo element.find('.image') # This progress bar *shrinks* from full width to the right updateProgressBar: (event...

User.singleton_class.ancestors # => [# , B::ClassMethods, A, # , # , Class, Module, Object, Kernel, BasicObject] User.singleton_class.class # => Class User.singleton_class.ancestors[1].class # => Module Note that # is the singleton class and as we have seen the parent...

...number of attributes that will be set, then call the original method: movie = Movie.find(1) movie.attributes = { title: 'Sunshine', year: '2007' } # Console prints "Setting 2 attributes" # Check that the original #attributes...