データモデリング
- データと情報
- エンティティとリレーションシップ
- リソースエンティティとイベントエンティティ
- リレーションシップと多重度(カージナリティ)
- PK と AK と FK
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
#!/bin/sh | |
date=$1 | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
if [[ "$(git log $branch --since $date | wc -l)" -eq 0 ]]; then | |
if [[ "$branch" =~ "origin/" ]]; then | |
local_branch_name=$(echo "$branch" | sed 's/^origin\///') | |
if [[ "$DRY_RUN" -eq 1 ]]; then | |
echo "git push origin :$local_branch_name" |
var tweet = "Currently chilling out at W1B 2EL, then on to WC2E 8HA or maybe even L1 8JF! :-)"; | |
// Here's a simple regex that tries to recognise postcode-like strings. | |
// See http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation | |
// for the rules on how UK postcodes are formatted. | |
var postcode_regex = /[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/g; | |
var postcodes = tweet.match(postcode_regex); | |
console.log(postcodes); |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
matcher | aliased to | description |
---|---|---|
a_truthy_value | be_truthy | a truthy value |
a_falsey_value | be_falsey | a falsey value |
be_falsy | be_falsey | be falsy |
a_falsy_value | be_falsey | a falsy value |
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.