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 / notes.sh
Created February 21, 2023 02:28
OPENSSL Ruby Issues (fixing for frum vm)
# With Ruby 2.7.7
# The error:
# OpenSSL 3 - symbol not found in flat namespace '_SSL_get1_peer_certificate'
frum uninstall 2.7.7
frum install 2.7.7 --with-openssl-dir=$(brew --prefix openssl@1.1)
gem install bundler -v 2.2.19 # or whatever the Gemfile.lock bundler version you have is
bundle config build.puma --with-cppflags=-I$(brew --prefix openssl@1.1)/include
bundle install
@josephrexme
josephrexme / timezones.json
Created November 27, 2015 16:50
Timezones in JSON format
[
{
"value": "Dateline Standard Time",
"abbr": "DST",
"offset": -12,
"isdst": false,
"text": "(UTC-12:00) International Date Line West"
},
{
"value": "UTC-11",
@josephrexme
josephrexme / convertkit.html
Last active December 22, 2021 17:58
Minimal ConvertKit Subscribe Form
<form action="https://app.convertkit.com/forms/YOUR_FORM_ID/subscriptions" method="post" target="_blank" data-uid="" data-format="inline" data-version="5" data-sv-form="YOUR_FORM_ID" novalidate="">
<label for="EMAIL">Enter your email address to get latest updates in your inbox</label>
<div>
<input type="email" name="email_address" id="EMAIL" placeholder="e.g janet@nasa.gov">
<button type="submit">Subscribe</button>
</div>
</form>
@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 */
}
import React, { useMemo } from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import Img from 'gatsby-image';
const MyComponent = ({ src, ...props }) => {
const data = useStaticQuery(graphql`
query {
myStuff( ) {
}
}
// 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 / _grid.scss
Last active July 26, 2018 20:13
Flexbox grid extract from ionic http://ionicframework.com/docs/components/#grid . For a CSS version, you can transpile here https://www.sassmeister.com
/**
* Grid:
* Using flexbox for the grid, inspired by Philip Walton:
* http://philipwalton.github.io/solved-by-flexbox/demos/grids/
* By default each .col within a .row will evenly take up
* available width, and the height of each .col with take
* up the height of the tallest .col in the same .row.
*
* @example
* <div class="row">
@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.
const TrumpSort = (arr) => {
let pushArray = [0];
let wallHeight = pushArray[pushArray.length - 1];
arr.forEach((v, i) => {
if(v > wallHeight) pushArray.push(v);
});
pushArray.shift();
return pushArray;
};