Skip to content

Instantly share code, notes, and snippets.

View francaguilar's full-sized avatar

Francisco Aguilar francaguilar

View GitHub Profile
@Klerith
Klerith / index.ts
Last active August 23, 2024 21:46
Vuex + TypeScript - Store Structure Strongly Typed
import { createStore } from 'vuex';
// My custom modules
import exampleModule from './module-template';
import { ExampleStateInterface } from './module-template/state';
export interface StateInterface {
// Define your own store structure, using submodules if needed
// example: ExampleStateInterface;
<template>
<div>
<el-upload
class="upload-demo"
action="/api/upload/"
name="file[]"
:on-success="handleSuccess"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
@wuchengwei
wuchengwei / dataURL to blob and blob to dataURL
Last active May 12, 2024 21:49
dataURL to blob and blob to dataURL
//**dataURL to blob**
function dataURLtoBlob(dataurl) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while(n--){
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], {type:mime});
}
import requests
# Basic Variables
MIN_RANGE = 22000
MAX_RANGE = 40000
BASE_URL = 'http://B%d.cdn.telefonica.com/%d/%s_SUB.m3u8'
CHANNELS_IDS = ['NICK', 'DSNJR', '40TV', 'DSNYXD', 'COCINA', '24HORAS', 'INVITADO', 'FOX',
'AXN', 'CLL13', 'TNT', 'FOXCRIME', 'CSMO', 'AXNWHITE', 'PCMDY', 'SYFY', 'TCM',
'CPLUSLG', 'MOVFUTBOL', 'CPLUSCHP', 'NTLG', 'NATGEOWILD', 'CPLUS1']