Skip to content

Instantly share code, notes, and snippets.

View pateskinasy's full-sized avatar
💭
🙈🙉🙊 & ∞ curious

Pat Eskinasy pateskinasy

💭
🙈🙉🙊 & ∞ curious
View GitHub Profile
@levelsio
levelsio / makebook_obfuscate.php
Last active April 20, 2024 01:51
Obfuscate your ebook so that people who didn't pay can read it, partly
<?php
/*
I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it.
It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though.
It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function.
You should check if user paid for book or not, then either run ob_start or not!
@tompec
tompec / mailchimp-newsletter-bootstrap.html
Last active August 27, 2020 14:08
Simple Bootstrap template for Mailchimp embedded form with input group
<!DOCTYPE html>
<html>
<head>
<title>Mailchimp newsletter</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
div.mce_inline_error {
color: red;
@jungchris
jungchris / selector.js
Created April 11, 2017 02:17
A Simple Redux Selector Example
import { createSelector } from 'reselect'
const shopItemsSelector = state => state.shop.items
const taxPercentSelector = state => state.shop.taxPercent
const subtotalSelector = createSelector(
shopItemsSelector,
items => items.reduce((acc, item) => acc + item.value, 0)
)
@nicolas-briemant
nicolas-briemant / rules.md
Last active December 23, 2020 04:44
how to structure a redux application

how to structure a redux application

A well-thought structure is helpful for the maintainability of the code.
It also helps to avoid some common anti-patterns.
A redux application is not necessary a big thing, it can also be a component that is complex enough to require redux.

There are the only 2 rules to comply with, so it is not painful to always have them in mind while developing.

use a modular organisation

@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>