Skip to content

Instantly share code, notes, and snippets.

View josephrexme's full-sized avatar
:octocat:
Training wolves and dragons

Joseph Rex josephrexme

:octocat:
Training wolves and dragons
View GitHub Profile
blueprint:
name: Calendar Notifications & Actions
description: >
# 📅 Calendar Notifications & Actions
**Version: 1.3**
The most common automation used for calendar notifications & actions.
@josephrexme
josephrexme / checkered.css
Created December 4, 2021 21:52 — forked from dfrankland/checkered.css
CSS Checkered pattern that can be used on all modern browsers.
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 */
}
// 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
};
@josephrexme
josephrexme / The Technical Interview Cheat Sheet.md
Created March 17, 2016 15:22 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

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.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@josephrexme
josephrexme / rspec_rails_cheetsheet.rb
Created September 3, 2016 12:57 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#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)
@josephrexme
josephrexme / introrx.md
Created May 18, 2016 14:58 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<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>
@josephrexme
josephrexme / active_data.js.coffee
Created January 29, 2016 09:17 — forked from stephanschubert/active_data.js.coffee
Simple two-way data binding
do ($ = jQuery, exports = window) ->
class ActiveDataBinder
constructor: (uid) ->
# Use a jQuery object as simple PubSub
pubSub = $ {}
# We expect a 'data' attribute specifying the binding
@josephrexme
josephrexme / README.md
Last active August 29, 2015 14:27 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
# Simple bijective function
# Basically encodes any integer into a base(n) string,
# where n is ALPHABET.length.
# Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047
ALPHABET =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//)
# make your own alphabet using:
# (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join