Skip to content

Instantly share code, notes, and snippets.

View panoply's full-sized avatar
🥛
Rich in the hood

ΝΙΚΟΛΑΣ panoply

🥛
Rich in the hood
View GitHub Profile
@panoply
panoply / source.js
Created October 16, 2017 11:18
Source Code (Puffer email)
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
@panoply
panoply / base.mjml
Created October 16, 2017 11:51
MJML Base Skeleton
<mjml>
<mj-head>
<mj-attributes>
<mj-text padding="0" />
<mj-class name="blue" color="blue" />
<mj-class name="big" font-size="20px" />
<mj-all font-family="Helvetica" color="#000" />
</mj-attributes>
</mj-head>
<mj-body>
@panoply
panoply / unfollow.js
Created September 6, 2016 20:10
Unfollow all on Instagram
setInterval(Unfollow, 1000);
function Unfollow() {
var followingBox = document.querySelectorAll("a[href='/brixtol/following/']");
followingBox[0].click();
setTimeout(function(){
var following = document.querySelectorAll("._aj7mu._r4e4p._95tat._o0442");
for (var i = 0; i < following.length; i++){
following[i].click();
}
var close = document.querySelectorAll("._3eajp");
@panoply
panoply / localstorage-wait.js
Created November 22, 2017 11:50
Aysnc LocalStorage method. Use as Static fn waiting for localStorage value to be entered.
static wait(key) {
return Promise
.resolve()
.then(() => {
return localStorage.getItem(key)
});
}
class Example {
fn(){
const root = document.querySelector('#locale')
const component = {
view(vnode){
return m(".ul.dash", [
m('li.shipping', [
@panoply
panoply / get-started.html
Created March 22, 2018 23:57
Mithril – Get Started
<body>
<script src="//unpkg.com/mithril/mithril.js"></script>
<script>
var root = document.body
// your code goes here!
</script>
</body>
@panoply
panoply / turboclick.js
Created March 31, 2018 16:31
Prefetching Turbolinks 5
import Turbolinks from 'turbolinks';
export default () => {
const OldHttpRequest = Turbolinks.HttpRequest;
Turbolinks.CachedHttpRequest = class CachedHttpRequest extends Turbolinks.HttpRequest {
constructor(_, location, referrer) {
super();
super(this, location, referrer);
@panoply
panoply / form.html
Created April 21, 2018 22:34
Mailchimp Subscription
<form action="http://brixtol.us13.list-manage.com/subscribe/post-json?">
<input type="hidden" name="COUNTRY" value="SE" id="mce-COUNTRY">
<input type="text" name="NAME" placeholder="Name" id="mce-NAME">
<input type="email" name="EMAIL" placeholder="Email Address" id="mce-EMAIL">
<button type="submit" name="subscribe" id="mc-embedded-subscribe">
Submit
</button>
<div id="response"></div>
</form>
@panoply
panoply / money.js
Created June 21, 2018 07:28
Shopify Currency Exchange
/**
* Currency Converter
* Used by Locale component for currency exchange rates.
*/
/* Modules */
import fx from "money";
import accounting from "accounting";
import symbol from 'currency-symbol-map';
import store from 'store/dist/store.modern';
/* toggleGrid (body) {
const toggle = body.querySelector('#filter-grid')
const collection = body.querySelector('#collection-products')
const products = collection.querySelectorAll('.col-6')
toggle.onclick = event => {
return {
small: () => {
products.forEach(el => {