Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🙈🙉🙊 & ∞ curious

Pat Eskinasy pateskinasy

💭
🙈🙉🙊 & ∞ curious
View GitHub Profile
@levelsio
levelsio / makebook_obfuscate.php
Last active Dec 16, 2021
Obfuscate your ebook so that people who didn't pay can read it, partly
View makebook_obfuscate.php
<?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 Aug 27, 2020
Simple Bootstrap template for Mailchimp embedded form with input group
View mailchimp-newsletter-bootstrap.html
<!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 Apr 11, 2017
A Simple Redux Selector Example
View selector.js
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 Dec 23, 2020
how to structure a redux application
View rules.md

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 Jan 21, 2021
Make the Mailchimp Subscriber popup appear on click
View clickable-element.html
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>