Skip to content

Instantly share code, notes, and snippets.

View riderx's full-sized avatar
🏠
Working from home

Martin DONADIEU riderx

🏠
Working from home
View GitHub Profile
@riderx
riderx / ahref.html
Created June 21, 2023 02:11
ahref_found
<!DOCTYPE html><!-- This site was created with Podcastpage - https://podcastpage.io -->
<html lang="en">
<head>
<link rel="preconnect" href="https://assets.podcastpage.io" crossorigin="" fetchpriority="high">
<link rel="preconnect" href="https://images.podcastpage.io" crossorigin="" fetchpriority="auto">
<link rel="preconnect" href="https://sites.podcastpage.io" crossorigin="" fetchpriority="auto">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="" fetchpriority="auto">
<link rel="dns-prefetch" href="https://assets.podcastpage.io" fetchpriority="high">
<link rel="dns-prefetch" href="//fonts.googleapis.com" fetchpriority="auto">
@riderx
riderx / sprite.css
Last active June 15, 2023 01:59
Vue-tel-input made with tailwind for better customization
/* This file is just for the flags, it wasn't modified */
.vti__flag {
width: 20px;
}
.vti__flag.be {
width: 18px;
}
.vti__flag.ch {
width: 15px;
}
@riderx
riderx / Scriptable_MRR_Charmogul.js
Last active March 9, 2023 15:23
Scriptable MRR Charmogul
const API_TOKEN = '***'
const API_SECRET = '***'
class LineChart {
// LineChart by https://kevinkub.de/
constructor(width, height, values) {
this.ctx = new DrawContext()
this.ctx.size = new Size(width, height)
this.values = values
@riderx
riderx / worker.js
Created January 11, 2023 05:22
Cloudflare worker
export default {
async fetch(request, env, context) {
const url = new URL(request.url)
const end = url.pathname.split('/').pop()
// check if end is number with regex
const regex = /\d/g
const isNumber = regex.test(end)
if (isNumber && url.pathname.startsWith('/episode/')) {
// is number search for the new name and redirect
return await handleRequest(request)
@riderx
riderx / worker.js
Last active January 9, 2023 20:13
Cloudflare worker to rewrite podcast number to title for podcastpage
export default {
async fetch(request, env) {
return await handleRequest(request)
}
}
const getlink = async (number) => {
const resp = await fetch('https://anchor.fm/s/414d1d4/podcast/rss')
const data = await resp.text()
// search all occurence of https://anchor.fm/indiemakers/episodes/.*< in data
@riderx
riderx / gist:fc8d0d70e99cc6743a392b0caf315ccf
Last active October 28, 2022 07:45
fix FMC cordova plugin android 12
// create this file in hooks/before_prepare.js
// add that in config.xml <hook src="hooks/before_prepare.js" type="before_prepare" />
// this file fix the node_module directly, that the only solution i found who work
console.log('Fix activity#com.gae.scaffolder.plugin.FCMPluginActivity')
// if android:name="com.gae.scaffolder.plugin.FCMPluginActivity"> present in platforms/android/app/src/main/AndroidManifest.xml replace by android:name="com.gae.scaffolder.plugin.FCMPluginActivity" android:exported="false">
// open file
const fs = require('fs');
@riderx
riderx / script.js
Last active October 30, 2022 16:32
Scriptable script to get info in widget ios
// By @riderx
// Prerequisite: install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188
// Create an API key by navigating to Profile > View Profile. Then:
// Under API Keys, select New API Key.
// access Read-only
const API_TOKEN = '***'
const API_SECRET = '***'
[{"langue":"fr","categorie":"litterature","theme":"Maxime Chattam","difficulte":"débutant","question":"Chez quel éditeur Maxime Chattam a-t-il publié 'Les Arcanes du chaos' en 2006 ?","reponse_correcte":"Albin Michel","autres_choix":["Michel Lafon","France Loisirs","Gallimard"],"anecdote":"'Les Arcanes du chaos' donne un aspect troublant du monde où tout n'est que manipulation, argent et pouvoir.","wikipedia":"https://fr.wikipedia.org/wiki/Les_Arcanes_du_chaos"},{"langue":"fr","categorie":"celebrites","theme":"Actu people : mars 2017","difficulte":"débutant","question":"Quelle star de télé-réalité s'est fait dé-tatouer la poitrine en mars 2017 ?","reponse_correcte":"Nabilla","autres_choix":["Myriam Abel","Loana","Caroline Receveur"],"anecdote":"Nabilla Benattia a tourné une intervention pour un numéro télévisuel de 'Zone Interdite' aux côtés d'Ophélie Meunier.","wikipedia":"https://fr.wikipedia.org/wiki/Nabilla_Benattia"},{"langue":"fr","categorie":"sciences","theme":"Alan Turing","difficulte":"expert","quest
@riderx
riderx / Dockerfile
Last active March 3, 2019 13:34 — forked from kenfehling/Dockerfile
Docker: Ubuntu 16.04 with Node 6.10.2, Selenium Standalone, Chrome Headless
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
apt-transport-https \
openjdk-8-jre-headless \
curl \
xz-utils \
unzip \
bzip2 \
@riderx
riderx / designer.html
Created December 23, 2014 18:24
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;