- Ember: See if we can simplify
StoryController#isOnGroupPage
- Ember: Clarify
Story#canDeleteStory
's conditional - Ember: Nuke group management page and replace with button to delete group (for site admins)
- Ember: Remove all remaining references to
group.closed
- CSS: Rename
community-widget.css.scss
todashboard-widgets.css.scss
- Rails: Change Paperclip URL scheme to
/group_avatar/:group_id.:ext
- Rails: Change
GroupMember#update_counter_cache!
to use atomic incr/decr - Rails: Deduplicate Trending systems
- Rails: Add pg_search to groups
- Rails: Remove
group_members
index ongroup_id
This file contains hidden or 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
<?php | |
include_once 'classes/db.class.php'; | |
/** | |
* This is an ORM. | |
* I may have gone a bit overboard on this final project. | |
* I just got tired of constantly dropping into raw SQL for mundane crap. | |
*/ | |
class Model { | |
private $_attributes = array(); |
This file contains hidden or 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
/* | |
* Released under the MIT License | |
* | |
* Copyright (c) 2014 Peter Lejeck | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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 Anime | |
pg_search_scope :search, | |
against: { title: 'A', alt_title: 'A', synopsis: 'C' }, | |
using: { | |
tsearch: { | |
prefix: true, | |
# Normalize to string length and scale to 0..1 | |
normalization: 32, | |
dictionary: 'english' | |
}, |
This file contains hidden or 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
// app/transforms/array.js | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
deserialize: function(value) { | |
if (Ember.isArray(value)) { | |
return Ember.A(value); | |
} else { | |
return Ember.A(); |
Here's how it's going to look like from the end user perspective:
1 hour before my PRO membership ends, if I am on a recurring plan Hummingbird will try to charge my credit card. If it succeeds everything is good. If it fails my subscription will run out and Hummingbird will try to charge my credit card again tomorrow, 3 days from now and 5 days from now. I will receive an email from Hummingbird if the charge is successful, and a different email every time charging my card fails.
This file contains hidden or 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
{ | |
"pack": { | |
"hira-vowels": { | |
"name": "Vowels", | |
"cards": [ | |
{ "id": "e", "front": "え", "back": "e" }, | |
{ "id": "a", "front": "あ", "back": "a" }, | |
{ "id": "i", "front": "い", "back": "i" }, | |
{ "id": "o", "front": "お", "back": "o" }, | |
{ "id": "u", "front": "う", "back": "u" } |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<GameState xmlns="http://static.plejeck.com/apps/lurn/gamestate.xsd"> | |
<Pack id="hiragana-basic"> | |
<Card id="hira-vowels:e" value="12314" /> | |
<Card id="hira-vowels:a" value="43142" /> | |
</Pack> | |
<Setting id="flipped" value="true" /> | |
<Setting id="timer" value="true" /> | |
<Setting id="adaptive-timer" value="true" /> | |
<State id="deck" value="hiragana-basic:hira-vowels,hiragana-basic:hira-k" /> |
This file contains hidden or 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
desc "Bulk import info from TVDB" | |
task :bulk_import_tvdb, [:shows] => [:environment] do |t, args| | |
require 'parallel' | |
ActiveRecord::Base.connection_pool.disconnect! | |
config = ActiveRecord::Base.configurations[Rails.env] | |
config['pool'] = 20 | |
ActiveRecord::Base.establish_connection(config) | |
# This fixes some threaded autoloading issues |
This file contains hidden or 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
require 'oj' | |
class HummingbirdListImport | |
include Enumerable | |
# Most ListImport systems shouldn't need a `list` parameter, since they separate manga and anime | |
# exports. We do, since our backups contain your whole library. | |
def initialize(str, list) | |
@list = Oj.load(str)[list.to_s] | |
# The class of the database we're matching against |