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/bash | |
SANDBOX_DIR="cabal-dev" | |
SDIST_DIR="./sdist/" | |
SDIST_SUFFIX=".tar.gz" | |
PACKAGES_CONF_DIR=$SANDBOX_DIR"/packages-"`ghc --numeric-version`".conf/" | |
find $SDIST_DIR -name *$SDIST_SUFFIX -print0 | while read -d $'\0' sdist_path | |
do |
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 'rspec' | |
require 'savon_spec' | |
RSpec.configure do |config| | |
config.include Savon::Spec::Macros | |
end | |
describe 'with client' do | |
let(:client) do |
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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20; |
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
OMITTED NORMAL MAIL HEADERS | |
X-Github-Reason: comment | |
List-Archive: https://github.com/dylankeil/chronos | |
List-Unsubscribe: <mailto:[email protected]> | |
List-Id: dylankeil/chronos <chronos.dylankeil.github.com> | |
List-Post: <mailto:[email protected]> | |
X-Github-Recipient: dukedave | |
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
=> VACUUM VERBOSE location_events; | |
INFO: vacuuming "public.location_events" | |
INFO: scanned index "location_events_pkey" to remove 3882346 row versions | |
DETAIL: CPU 0.91s/7.16u sec elapsed 13.93 sec. | |
INFO: scanned index "index_location_events_on_user_id" to remove 3882346 row versions | |
DETAIL: CPU 1.68s/9.01u sec elapsed 21.61 sec. | |
INFO: scanned index "index_location_events_on_user_id_where_not_archived" to remove 3882346 row versions | |
DETAIL: CPU 0.00s/1.70u sec elapsed 1.66 sec. | |
INFO: "location_events": removed 3882346 row versions in 92228 pages | |
DETAIL: CPU 0.21s/1.98u sec elapsed 8.32 sec. |
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
(13:27:40) dukedave: Lazy post: Any comments on my question here, the single answer, and my comment on that answer: http://dba.stackexchange.com/questions/25890/does-updating-a-partially-indexed-field-add-or-remove-it-from-an-index-in-postgr | |
(13:29:05) RhodiumToad: dukedave: your answer seems correct | |
(13:29:19) supplicant: I think dukedave is the commenter? | |
(13:29:31) dukedave: Yes, I'm the asker and commenter :) | |
(13:29:48) RhodiumToad: dukedave: ok, so the answer you received is correct :-) | |
(13:29:50) dukedave: The answer certainly makes sense, but I'm still seeing the partial index grow | |
(13:29:56) dukedave: Which seems in consistent | |
(13:30:19) RhodiumToad: dukedave: no, not really. it'll depend on the exact pattern of updates. here's why: | |
(13:30:44) dukedave: The purpose of making it partial was that it only has non-archived rows in it, which should be a reasonably fixed number | |
(13:30:44) RhodiumToad: dukedave: I'm assuming we're inserting in strictly increasing order of ids, since that's what usually happ |
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
// ==UserScript== | |
// @name Mittens | |
// @namespace http://userscripts.org/users/489276 | |
// @include http* | |
// @version 1 | |
// @grant None | |
// ==/UserScript== | |
// Thanks to: http://stackoverflow.com/a/5494405/21115http://stackoverflow.com/a/5494405/21115 |
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
; <<>> DiG 9.8.1-P1 <<>> git.tddium.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51959 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;git.tddium.com. IN A | |
;; ANSWER SECTION: |
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
# Normal has_many / belongs_to: | |
>> a = c.permitted_ips | |
=> [] | |
# What we got back was just an Array: | |
>> a.class | |
=> Array | |
# Now build a new record: | |
>> c.permitted_ips.build :address => '123123' |
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 Range | |
def overlaps?(other) | |
(self.first <= other.last) and (other.first <= self.last) | |
end | |
end |
OlderNewer