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
@linked_entities = @document.document_entities | |
.where.not(entity_id: nil) | |
.includes(:entity) | |
.includes(entity: [:universe, :user, *relations_for_class(-> entity.entity_type)]) | |
.order('entity_type asc') |
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
Rails.application.config.content_types[:premium].each do |content_type| | |
authorizer_class_name = "#{content_type.name}ContentAuthorizer" | |
Object.const_set(authorizer_class_name, Class.new(ContentAuthorizer) do | |
def self.createable_by?(user) | |
return false if ENV.fetch('CONTENT_BLACKLIST')&.split(',')&.include?(user.email) | |
[ | |
PermissionService.billing_plan_allows_extended_content?(user: user), | |
PermissionService.user_can_collaborate_in_universe_that_allows_extended_content?(user: user), | |
PermissionService.user_has_active_promotion_for_this_content_type(user: user, content_type: content_type.name) |
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
Do you believe the U.S. government is a secret military agency working with aliens? | |
Does the sun still shine in the south-eastern United States? Is it possible that the sun was actually a global warming event and that only the northern hemisphere is suffering the effects? | |
Can we all just agree that if global warming doesn't stop, the only ones who will really suffer are the 99%. So why can't we all just agree that it is all right to leave global warming to it? | |
If there is alien life on other planets could it be beneficial or just a threat to mankind? | |
Is the FBI conducting an ongoing search for aliens? | |
Do the alien abductees you have seen on Earth from other planets also exist on other dimensions? | |
Why is the government looking into aliens? | |
How does the US military get involved in extraterrestrial activity? | |
Is it possible the CIA is trying to help aliens with a space program? | |
What is the best alien abduction story? |
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
Chemtrails | |
Conspiracy Theories | |
Illuminati | |
Secret Societies | |
National Security Agency | |
Mass Surveillance | |
New World Order (NWO) | |
PRISM (NSA surveillance program) | |
Flat Earth Research | |
Flat Earth Theory |
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
When writing a short story what should I do first? | |
Can you write a short science fiction story that you think most people will enjoy? | |
How would you write a story where an intelligent person is deliberately sabotaging the most interesting ideas in the audience's head? | |
What are the best tips for writing an interesting short story? | |
What inspired you to write short stories? | |
What are the basics of writing short stories? | |
What are the best online courses to teach aspiring writers how to create and write short stories? | |
What does Edgar Allan Poe's short stories tell us about the dangers that lie in the dark? | |
Can you give a short motivational poem to read to a little girl? | |
How can I write a poem for somebody dying soon? |
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
<%= | |
link_to send( | |
"page_tag_#{content_type.pluralize}_path", | |
slug: PageTagService.slug_for(page_tag.tag) | |
), class: "#{Character.color}-text" do | |
%> | |
<i class="material-icons">loyalty</i> | |
<small class="grey-text">tagged</small> | |
<%= page_tag.tag %> | |
<% end %> |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn app server | |
# Description: starts unicorn using start-stop-daemon | |
### END INIT INFO |
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
upstream app { | |
# Path to Unicorn SOCK file, as defined previously | |
server unix:/home/ubuntu/listpump/shared/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 0.0.0.0; | |
server_name localhost; | |
root /home/ubuntu/listpump/public; | |
try_files $uri/index.html $uri @app; | |
location @app { |
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
def self.combined_average_grade_level corpus | |
scores = [ | |
automated_readability_index(corpus), | |
coleman_liau_index(corpus), | |
FleschKincaidService.grade_level(corpus), | |
forcast_grade_level(corpus), | |
gunning_fog_index(corpus), | |
smog_grade(corpus) | |
] | |
scores.reject! &:nan? |
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
/* | |
* A* Pathfinding Algorithm | |
* Modified from my solution to the "After the Dance Battle" challenge | |
* in the 2011 Facebook Hacker Cup | |
* by Andrew Brown | |
* Last modified: 1/14/11 | |
*/ | |
using System; | |
using System.IO; |