Skip to content

Instantly share code, notes, and snippets.

View egibney's full-sized avatar
💭
Back from a coding break

Emmet Gibney egibney

💭
Back from a coding break
  • Rewardful
  • Dublin, Ireland
View GitHub Profile
$(function(){
let referral_url = new URL(window.location.href);
if (referral_url.searchParams.has('gclid') && referral_url.searchParams.has('via')) {
setTimeout(function(){
Cookies.remove('rewardful.referral', { path: '/', domain: window.location.hostname })
console.log(Cookies.get('rewardful.referral'))
console.log("Deleted referral cookie as visit came from Google Ads (forbidden by Terms of Service)")
}, 2000)
}
});
{
"id": "Pacific/Midway",
"name": "Midway Island, Samoa",
"gmt_offset": "(GMT-11:00)"
},
{
"id": "Pacific/Pago_Pago",
"name": "Pago Pago",
"gmt_offset": "(GMT-11:00)"
},
def convert_to_audio(text, gender)
client = Google::Cloud::TextToSpeech.text_to_speech
input_text = { text: text }
# Note: the voice can also be specified by name.
# Names of voices can be retrieved with client.list_voices
# https://cloud.google.com/text-to-speech/docs/voices
if gender == 'MALE'
name = 'en-US-Standard-D'
def create
@streamplay = Streamplay.find(params[:id])
page_read = @streamplay.page_read
price = page_read * 400
session = Stripe::Checkout::Session.create(
payment_method_types: ['card'],
customer_email: current_user.email,
line_items: [{
name: 'Convert screenplay to audio',
amount: price,
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta content="IE=edge, chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A lightweight, dependency free, masonry layout library.">
<title>Macy.js - A lightweight, dependency free, JavaScript masonry layout library</title>
* { box-sizing: border-box; }
body { font-family: sans-serif;
color: #000000; }
.scene {
width: 200px;
height: 300px;
border: 1px solid #CCC;
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="scene">
var users = [
{
"id": "1",
"pics": [
{
"image": "https://images.dog.ceo/breeds/clumber/n02101556_2642.jpg"
},
{
"image": "https://images.dog.ceo/breeds/shihtzu/n02086240_5889.jpg"
},
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style>
#progress {
background-color: #000000;
height: 10px;
}
function setContent() {
url = data[user_index].pictures[pic_index].url;
document.getElementById('dog_image').src = url;
}
function next () {
pics_in_user = data[user_index].pictures.length;
if (pic_index === pics_in_user-1) {
pic_index = 0;
if (user_index === data.length-1) {