Skip to content

Instantly share code, notes, and snippets.

View MoonMoon85's full-sized avatar

Will Shalders MoonMoon85

  • Melbourne, Australia
View GitHub Profile
@MoonMoon85
MoonMoon85 / app.css
Created February 12, 2020 23:49
[SAN39] Link To Competition Page On Confirmation Page
.comp-details {
text-align: center;
}
.comp-details img {
max-width: 100%;
}
.comp-details h1 {
margin-bottom: 20px;
@MoonMoon85
MoonMoon85 / app.py
Created January 16, 2020 23:42
Smart home plant monitoring
#!/usr/bin/env python3
#############################################################################
import RPi.GPIO as GPIO
import time
import Freenove_DHT as DHT
DHTPin = 11 #define the pin of DHT11
redLedPin = 12 #RPI Board pin11
greenLedPin = 18
moisture = 16
@MoonMoon85
MoonMoon85 / app.js
Last active January 16, 2020 23:33
Market Mover
const utils = window.optimizely.get('utils')
function calcPercentage(fluc) {
return 100 / fluc
}
function calcDifference(a, b) {
return b - a
}
@MoonMoon85
MoonMoon85 / app.js
Created November 27, 2019 01:29
My Rewards fetch example
fetch("https://beteasy.com.au/experience/account/promotions/clientinventory", {"credentials":"include","headers":{"accept":"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9,ja;q=0.8,de;q=0.7,ru;q=0.6,zh-CN;q=0.5,zh;q=0.4,es;q=0.3,fr;q=0.2,ko;q=0.1,it;q=0.1,tr;q=0.1,pt;q=0.1,la;q=0.1","clientauth":"1312247699005CF1940CBC376860894B0D28DE00C950F121D2499B4075B31057F2CD25A441A375447A8E83558DEEA634CC880145CE7054A8FC83B951D10DD9BF5B6A2D8BD2F3FA25BF2EB313A8EA5328736549BD","sec-fetch-mode":"cors","sec-fetch-site":"same-origin"},"referrer":"https://beteasy.com.au/my-account/deposit","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"GET","mode":"cors"})
.then(res => {
console.log(res)
return res.json();
}).then(data => {
console.log(data)
})
@MoonMoon85
MoonMoon85 / index.js
Last active October 9, 2019 01:00
Optimizely bet confirmed tracking for Quick Bet
// Quick Bet Confirmed
window['optimizely'] = window['optimizely'] || [];
window['optimizely'].push({
type: "event",
eventName: "quick_bet_confirmed",
tags: {
// Add in tags from exiting event
}
});
@MoonMoon85
MoonMoon85 / app.txt
Created August 28, 2019 01:23
BetEasy Optimizely Bet Events
// When bet is added to bet slip
eventName: "bet_added"
// When bet is placed (not confirmed)
eventName: "bet_placed"
// When bet is canceled
eventName: "abandoned_bet"
// When confirm button is pressed
@MoonMoon85
MoonMoon85 / app.js
Created July 8, 2019 02:17
Re-bucket audience metrics setup
window.optimizely = window.optimizely || [];
var clickedBanner = 0;
// Query Optimizely user events and filter to clicks
var userBehaviorQueryData = optimizely.get("behavior").query({
version: "0.2",
sort: [{
field: ["time"],
direction: "descending"
@MoonMoon85
MoonMoon85 / app.css
Created June 17, 2019 04:36
[YF57] Plans Pricing Table Layouts (QA)
@media screen and (max-width: 767px) {
.plan-template-card .plan-template-card__content {
flex-direction: column;
}
.plan-template-card .plan-template-card__content .plan-template-card__content__text {
width: 100%;
}
.plan-template-card .plan-template-card__boxes {
@MoonMoon85
MoonMoon85 / app.css
Created June 17, 2019 04:02
[YF62] Hide Collections Page Banner
#react-banner {
display: none;
}
@MoonMoon85
MoonMoon85 / app.js
Created June 10, 2019 23:31
Google Optimize Starter Kit
console.log('Test Name');
function waitForEl(selector, callback) {
if (document.querySelector(selector)) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}