Skip to content

Instantly share code, notes, and snippets.

View gist:8488ecc39c1d34f6bbe0
> extend Hirb::Console
=> main
> table User.last(10), fields: [:id, :name]
User Load (1.5ms) SELECT `users`.* FROM `users` ORDER BY `users`.`id` DESC LIMIT 10
+----+----------------+
| id | name |
+----+----------------+
| 63 | chany0u |
| 64 | ae06710 |
| 65 | ps_lain_bot |
@tarky
tarky / gist:6c68c018ea4f7133ac26
Created May 26, 2015
Use of unresolved identifier
View gist:6c68c018ea4f7133ac26
/Users/araky/Documents/development/ios/GourmetSearch2/GourmetSearch/ShopMapDetailViewController.swift:23:22: Use of unresolved identifier 'shop'
なぜかTarget Membershipで〜〜Tests側にチェックが入ってると出るエラー。
View gist:ad68508615397c4ab843

#Overview

When you push Like button at a SNS, haven't you felt being just diplomatic instead of expressing your true sense of value? For example, when one of your coleagues share some music which is a kind of you don't like, have you experienced pushing Like button of the post reluctantly?

At Vond.me, you don't have to act like this, because vond.me uses Vote button instead of Like button. On Vote button system, there is a strong premise that each participant is expected to express one's sense of value.

View gist:e8fdaacd53bc850b5eb0

#Vondとは?

SNSでLikeボタンを押すときに、本当に良いと思っていないのに、社交辞令で押している ことはありませんか?例えば、同僚があなたの好きではない音楽をシェアていた時に、 しぶしぶLikeボタンを押した経験はありませんか?

Vondでは、そのような社交辞令をする必要がありません。なぜならVondはLikeではなく、 Voteを採用しており、参加者は心から好きなものにVoteするという前提があるから です。

@tarky
tarky / gist:0be96b063b17551f8888
Created May 11, 2015
data sql with column name.
View gist:0be96b063b17551f8888
mysqldump --no-create-info --complete-insert -u root inq_development >noddl.sql
View gist:e35a8163e10d747924b5
Theme.all.order(id: :asc).each do |theme|
theme.create_activity(created_at: theme.created_at, updated_at: theme.updated_at, user: theme.user)
theme.entries.order(id: :asc).each do |entry|
entry.create_activity(created_at: entry.created_at, updated_at: entry.updated_at, user: entry.user)
entry.votes.order(id: :asc).each do |vote|
unless entry.user == vote.user
vote.create_activity(created_at: vote.created_at, updated_at: vote.updated_at, user: vote.user)
end
end
end
View gist:fb16bcf704db4b09257f
u.destroy
(0.2ms) BEGIN
Authentication Load (0.5ms) SELECT `authentications`.* FROM `authentications` WHERE `authentications`.`user_id` = 5
SQL (2.3ms) DELETE FROM `authentications` WHERE `authentications`.`id` = 4
Twitter Load (3.2ms) SELECT `twitters`.* FROM `twitters` WHERE `twitters`.`id` = 3 LIMIT 1
SQL (1.7ms) DELETE FROM `twitters` WHERE `twitters`.`id` = 3
Follow Load (0.3ms) SELECT `follows`.* FROM `follows` WHERE `follows`.`user_id` = 5
Activity Load (0.4ms) SELECT `activities`.* FROM `activities` WHERE `activities`.`trackable_id` = 16 AND `activities`.`trackable_type` = 'Follow' LIMIT 1
Feed Load (1.0ms) SELECT `feeds`.* FROM `feeds` WHERE `feeds`.`activity_id` = 40
Notification Load (0.4ms) SELECT `notifications`.* FROM `notifications` WHERE `notifications`.`activity_id` = 40
View gist:3a08411a694eabe0b60e
C-b space (bound to next-layout by default) cycles through available layouts, you can also use the select-layout command.
M-1 to M-5 Arrange panes in one of the five preset layouts: even-
horizontal, even-vertical, main-horizontal, main-
vertical, or tiled.
On OS X, M is Esc, i.e. Ctrl-b Esc-1.
See man tmux for more details.
http://superuser.com/questions/493048/how-to-convert-2-horizontal-panes-to-vertical-panes-in-tmux
View gist:8118f7e2606a8c3c09af
http://superuser.com/questions/209437/how-do-i-scroll-in-tmux
View gist:328e5be7d6274618878d
https://gist.github.com/andreyvit/2921703