Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.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
| blueprint: | |
| name: Calendar Notifications & Actions | |
| description: > | |
| # 📅 Calendar Notifications & Actions | |
| **Version: 1.3** | |
| The most common automation used for calendar notifications & actions. | |
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
| body { | |
| background-image: | |
| linear-gradient(45deg, #ccc 25%, transparent 25%), | |
| linear-gradient(135deg, #ccc 25%, transparent 25%), | |
| linear-gradient(45deg, transparent 75%, #ccc 75%), | |
| linear-gradient(135deg, transparent 75%, #ccc 75%); | |
| background-size:25px 25px; /* Must be a square */ | |
| background-position:0 0, 12.5px 0, 12.5px -12.5px, 0px 12.5px; /* Must be half of one side of the square */ | |
| } |
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
| // The reducer function looks at each action that comes in | |
| // and based on the type generates a new state based on the | |
| // previous state and any additional data the action carried | |
| const reducer = (state, action) => { | |
| switch (action.type) { | |
| case "COUNT_INCREMENT": | |
| return { | |
| ...state, | |
| count: state.count + 1 | |
| }; |
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
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
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
| <div class="col-md-8 col-md-offset-1"> | |
| <div class="panel panel-default"> | |
| <%= form_for(@weekly_performance_review) do |f| %> | |
| <% if @weekly_performance_review.errors.any? %> | |
| <div id="error_explanation"> | |
| <h2><%= pluralize(@weekly_performance_review.errors.count, "error") %> prohibited this weekly_performance_review from being saved:</h2> | |
| <ul> | |
| <% @weekly_performance_review.errors.full_messages.each do |message| %> | |
| <li><%= message %></li> |
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
| do ($ = jQuery, exports = window) -> | |
| class ActiveDataBinder | |
| constructor: (uid) -> | |
| # Use a jQuery object as simple PubSub | |
| pubSub = $ {} | |
| # We expect a 'data' attribute specifying the binding |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
NewerOlder