Boot partitions from installations prior to the 16.04 era are terribly small. When you install updates and encounter errors due to a full /boot partition, consider risizing it.

...the steps described below, ask someone experienced to help you out. This has worked 100% so far. 1 out of 1 tries. ;) Scenario A: There is unassigned space on your...

...increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +-------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-----------------+----------+----------------+---------+ | test1 | MyISAM | 10 | Dynamic | 3 | 121...

...NULL | utf8_general_ci | NULL | | | | attachments | InnoDB | 10 | Compact | 0 | 0 | 16384 | 0 | 16384 | 3145728 | 1 | 2011-08-17 13:46:48 | NULL | NULL | utf8_general_ci | NULL | | | +-------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-----------------+----------+----------------+---------+

uri = URI('http://example.com/?foo=1&bar=2') stub_request(:get, 'example.com').with(query: {foo: 1, bar: 2}) Net::HTTP.get(uri) # ===> Success If you only want to check if foo is...

...uri = URI('http://example.com/?foo=1&bar=2') stub_request(:get, 'example.com').with(query: hash_including(foo: 1)) Net::HTTP.get(uri) # ===> Error hash_including doesn't parse query values to string, you need...

Use the PDF toolkit: sudo apt-get install pdftk To rotate page 1 by 90 degrees clockwise: pdftk in.pdf cat 1E output out.pdf # old pdftk pdftk in.pdf cat 1east output...

...out.pdf # new pdftk To rotate all pages clockwise: pdftk in.pdf cat 1-endE output out.pdf # old pdftk pdftk in.pdf cat 1-endeast output out.pdf # new pdftk The E (old pdftk...

...Let's say you have this $scope in your Angular controller: $scope.tasks = [ { 'text': 'Task 1' }, { 'text': 'Task 2' } ] And you have this template: {{task.text}} Which renders this HTML:

...bound to the second you can say this in jQuery: var li = $('li:eq(1)'); li.scope().node // => { 'text': 'Task 2' } Or if you'd like to access the entire list...

...query of three random words from the same vocabulary. I used sample sizes from 1,000 to 100,000 records, meaning 50,000 to 5,000,000 indexed words.

...more efficient than I thought For a medium-sized data set of up to 10,000 records (500,000 words) or so, LIKE only takes a fraction of a second...

commandlinefu.com

...helpful when watching them but, since they are ANSI color codes like ^[[4;36;1m, can be annoying when you are reading the logs with a tool that does just...

Remove them with sed: cat staging.log | sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" This will print the log without colors...

codepen.io

position: absolute; top: 0; bottom: 0; } .section::before { left: calc(50% - 50vw); right: 100%; } .section::after { left: 100%; right: calc(50% - 50vw); } Here is how we place the ::before...

...the viewport width and end up at the very left of the window. right: 100% means that the right side of ::before ends at the left of .section.

...s $http service will strip that header when the request data (body) is blank. [1] This is possibly a misconception of RFC2616. Here is how to send GET requests with...

Content-Type:application/json Host:localhost User-Agent:(...) X-Force-Content-Type:application/json Yay. :) [1] The problem is even worse when using Restangular which itself does not even allow passing...

When deploying an application with "cap deploy" by default [1] you only deploy your code but do not run migrations. To avoid an application to be running with code which...

...usage") you should consider hooking them after restart so your application starts up earlier. [1] You may want to consider overwriting the default task to run migrations (instead of update...

cookies = cookies.to_s.split("\n") unless cookies.is_a?(Array) cookies.each do |cookie| name, value = cookie.match(/^([^=]*)=([^;]*);/)[1,2] @cookies[name] = value end This won't work when you there are empty lines...

...exactly what happened for me. That is how my cookie looked when debugging: (rdb:1) puts headers['Set-Cookie'] remember_token=abcdef123456; path=/; expires=Mon, 31-Dec...

jqueryui.com

positionFields = element.find('input[id$=position]') for position, i in positionFields $(position).val i + 1 Outside of forms, within lists, you may want to manually post the new positions to...

...sortable items (i.e. table rows), which are expected in format _ . For example, tr#position_13 and tr#position_15 will be turned into position[]=13&position[]=15, which neatly resolves...

ariejan.net

...column by applying the proper limits (65535 bytes would be a text, up to 16777215 a mediumtext, and up to 4294967295 a longtext). Or if you know that you'll...

create_table 'example' do |t| t.integer :int # int (4 bytes, max 2,147,483,647) t.integer :int1, :limit => 1 # tinyint (1 byte, -128 to 127) t.integer :int2, :limit...

...translations on arrival_places.id = arrival_place_translations.place_id AND arrival_place_translations.locale = "en"') .order('departure_place_translations.name, arrival_place_translations.name') .where(ride_id: 1) .paginate(page: 1, per_page: 20) .preload( departure_place: :translations, arrival_place: :translations )

...cluster locale settings: psql -p 5435 ^ postgres=# SHOW LC_COLLATE; lc_collate ------------- en_US.UTF-8 (1 row) postgres=# SHOW LC_CTYPE; lc_ctype ------------- en_US.UTF-8 (1 row) You may also list...

...removed and another one added. $ git diff diff --git a/app/models/content_migration/photo.rb b/app/models/content_migration/photo.rb deleted file mode 100644 index fea2bca..0000000 --- a/app/models/content_migration/photo.rb +++ /dev/null @@ -1,42 +0,0 @@ -class ContentMigration::Photo < ActiveRecord::Base # ... # ...

...git a/app/models/content_migration/record/photo.rb b/app/models/content_migration/record/photo.rb new file mode 100644 index 0000000..2c8b70a --- /dev/null +++ b/app/models/content_migration/record/photo.rb @@ -0,0 +1,42 @@ +class ContentMigration::Record::Photo < ActiveRecord::Base # ... After: The diff shows that a file has...

{ :key => '_myapp_session', :domain => :all, # :all defaults to da tld length of 1, '.web' has length of 1 :tld_length => 2 # Top Level Domain (tld) length -> '*.myapp.web' has...

...server with lvh.me:3000 or anysubdomain.lvh.me:3000. Another way is, to add mysub.domain.web to /etc/hosts like 127.0.0.1 localhost mysub.domain.web Some developers suggest to write a rack middleware, but at the moment I...

makandra dev
speakerdeck.com

@instance, @@class, $global = [ 'instance', 'class', 'global' ] puts "#@instance, #@@class, #$global" Infinite arrays ring = [1, 2, 3].cycle p ring.take(5) # => [1, 2, 3, 1, 2] I haven't made...

...in Ruby as defined by ISO 8601, use Date#cwday, which returns values in 1..7 (mind the range difference to Date#wday). The first week of the year is...

...it. All days in this week belong to the year. This means that January 1st, 2nd and 3rd may or may not be part of the previous year's last...

...warning Integrity check: System parameters don't match error Integrity check failed error Found 1 errors. ======================================== Your Yarn packages are out of date! Please run `yarn install --check-files` to...

def scenario_ended return unless session.driver.is_a?(::Capybara::Selenium::Driver) self.driver_scenario_count += 1 if !browser_died? && driver_scenario_count >= MAX_SCENARIOS_PER_DRIVER kill_session! end end

end end class CustomHttpClient < Selenium::WebDriver::Remote::Http::Default def initialize(open_timeout: 10, read_timeout: 60) super end private def response_for(request) if Reaper.browser_died? raise 'Waiting...

// 0: { useCapture: false, passive: false, once: false, type: 'up:click', listener: ƒ } // 1: { useCapture: false, passive: false, once: false, type: 'up:click', listener: ƒ } // ...

...JavaScript Event objects, the DOM element that triggered the event is attached to them. [1] However, there are 2 "opinions" on which element that would be: The element that the...

...callbacks, you usually want to do things with the element they are bound to. [1] Note that some MouseEvents also have other targets...

...the following to your ~/.bashrc: export CDPATH=.:~/.bookmarks/ function mark { ln -sr "$(pwd)" ~/.bookmarks/"$1" } # Always resolve symbolic links (e.g. for bookmarks) alias cd="cd -P" This will add a...