Skip to content

Instantly share code, notes, and snippets.

Avatar
👹

Barbara Litwińska basial

👹
View GitHub Profile
View wrong_stations.js
wrongStations: function() {
var wrongStations = [];
$.each(this.store.all('station').content, function(i, station) {
if (station.get('name').parameterize() !== station.get('slug')) {
console.log(station.get('id'), station.get('name').parameterize(), station.get('slug'));
wrongStations.pushObject(station);
}
});
return wrongStations;
}
View user_avatar.rb
User.where(provider: "facebook").each do |user|
secure_avatar_url = user.passenger.avatar_url.sub('http:', '')
user.passenger.update_attribute(:avatar_url, secure_avatar_url)
end
View gist:9d8d4c441d0e37653f71
require "selenium-webdriver"
class ScratchLogger
def create_accounts(count, username, password)
1.upto(count).each do |i|
create_account("#{username}#{i}", "#{password}#{i}", "gcfcampus2016@gmail.com", "Styczeń", "2006")
end
end
View stats.rb
class Stats
class << self
def weekly_progress(issue_ids)
relation = Issue.where(id: issue_ids)
.order('year asc, week asc')
.group('year, week')
all = <<-SQL
date_part('week', created_at) as week,
date_part('year', created_at) as year,