Skip to content

Instantly share code, notes, and snippets.

View AndreasHassing's full-sized avatar
🤓

Andreas Bjørn Hassing AndreasHassing

🤓
View GitHub Profile
@AndreasHassing
AndreasHassing / output.txt
Created August 1, 2017 10:15 — forked from jpoehls/output.txt
PowerShell benchmarking function. Or, the Windows equivalent of Unix's `time` command.
PS> time { ping -n 1 google.com } -Samples 10 -Silent
..........
Avg: 62.1674ms
Min: 56.9945ms
Max: 87.9602ms
PS> time { ping -n 1 google.com } -Samples 10 -Silent -Long
..........
Avg: 00:00:00.0612480
Min: 00:00:00.0572167
users = User.where('name IS NULL')
users.each do |user|
# Some api call which will retrive name of the user based on user email
name = API.getUserName user.email
if name.blank?
next
else
user.name = name
end
end