This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
const string2buffer = string => { | |
let tempArray = new Uint8Array(string.length) | |
for(let i = string.length; i--) tempArray[i] = string.charCodeAt(i) | |
return tempArray.buffer | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"authLevel": "Anonymous", | |
"type": "httpTrigger", | |
"direction": "in", | |
"name": "req", | |
"route": ".well-known/acme-challenge/{hash}", | |
"methods": [ | |
"get" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('ALPHABET', '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'); | |
function numT58($num) | |
{ | |
$acc = ''; | |
while ($num >= 58) { | |
$mod = $num % 58; | |
$num = intval(floor($num / 58)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<location path="" xdt:Locator="Match(path)"> | |
<system.webServer> | |
<handlers> | |
<add name="PHP74x86_via_FastCGI" xdt:Locator="Match(name)" verb="GET,HEAD,POST,PUT,DELETE,PATCH" xdt:Transform="SetAttributes(verb)" /> | |
</handlers> | |
</system.webServer> | |
</location> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
const host = 'https://media.jefrancomix.work' | |
const apiKey = 'pixboost' | |
const imageBoosted = (relativeUrl, resize = false) => { | |
return 'https://pixboost.com/api/2/img/' + | |
host + | |
relativeUrl + | |
(resize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin full-height { | |
height: 100%; | |
margin: 0; | |
} | |
@mixin flex-center-x-y { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
html, body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { useCountdown } from 'hooks/useCountdown' | |
export function Countdown ({ launch }) { | |
const { days, hours, minutes, seconds } = useCountdown(launch) | |
return ( | |
<div className='Countdown'> | |
<div className='count'> | |
<div className='time D'> {days}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet | |
// Execute a callback on everything stored inside an object | |
function execRecursively(fn, subject, _refs = null){ | |
if(!_refs) | |
_refs = new WeakSet(); | |
// Avoid infinite recursion | |
if(_refs.has(subject)) | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NotificationService extends FirebaseMessagingService { | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
super.onMessageReceived(remoteMessage); | |
Notification notification = new NotificationCompat.Builder(this) | |
.setContentTitle(remoteMessage.getData().get("title")) | |
.setContentText(remoteMessage.getData().get("body")) | |
.setSmallIcon(R.mipmap.ic_launcher) | |
.build(); | |
NotificationManagerCompat manager = NotificationManagerCompat.from(getApplicationContext()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const tags = { | |
Negocios: 'business', | |
Social: 'social', | |
Familiar: 'familiar', | |
Personal: 'personal' | |
}; | |
module.exports = { |