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
#Total number of users registered | |
#Change line 4 comparasion value to 1 = last day, 7 = last week, 30 = last month, etc. | |
select count(u.id) from users u | |
where DATEDIFF(NOW(), u.created_at) <= 30; | |
#Total number of users with phone verification blocks | |
#Change line 10 comparasion value to 1 = last day, 7 = last week, 30 = last month, etc. | |
select count(distinct u.id) from users u | |
join user_blocks ub on u.id = ub.user_id and ub.block_type_name = "phone_verification" | |
where DATEDIFF(NOW(), u.created_at) <= 30 |
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 QueuedParallel | |
def self.run(array) | |
raise ArgumentError, "Must have array" unless array.is_a?(Array) | |
q = Queue.new | |
q.instance_variable_set(:@que, array) | |
(0..2).map do | |
Thread.new do | |
while !q.empty? | |
obj = q.pop |
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
[alias] | |
gone = ! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs git branch -D" |