This file contains hidden or 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 'dart:convert'; | |
| Map<String, dynamic> parseJwt(String token) { | |
| final parts = token.split('.'); | |
| if (parts.length != 3) { | |
| throw Exception('invalid token'); | |
| } | |
| final payload = _decodeBase64(parts[1]); | |
| final payloadMap = json.decode(payload); |
This file contains hidden or 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 | |
| use Slim\Http\Request; | |
| use Slim\Http\Response; | |
| use Slim\Http\Stream; | |
| $app->get('/stream', function (Request $request, Response $response, array $args) { | |
| // a 100mb file | |
| $path = '../public/files/document.pdf'; |
Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.
This setup will let you run Portainer on windows by using the docker.for.win.localhost endpoint.
Please note:
This file contains hidden or 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 'dart:async'; | |
| // Creditos | |
| // https://stackoverflow.com/a/52922130/7834829 | |
| class Debouncer<T> { | |
| Debouncer({ this.duration, this.onValue }); | |
| final Duration duration; | |
| void Function(T value) onValue; |
This file contains hidden or 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 'package:dio/dio.dart'; | |
| class ApiBaseHelper { | |
| static final String url = 'BASE_URL'; | |
| static BaseOptions opts = BaseOptions( | |
| baseUrl: url, | |
| responseType: ResponseType.json, | |
| connectTimeout: 30000, | |
| receiveTimeout: 30000, | |
| ); |
This file contains hidden or 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
| /********************************************************** | |
| * COSAS SIMPLES CON TIPOS PARA IR ABRIENDO BOCA. | |
| *********************************************************/ | |
| /* Una interfaz que maneja datos en una agenda de contactos. */ | |
| interface Person { | |
| /* Datos personales sobre esta persona. */ | |
| name: string; | |
| age: number; | |
| city: string; |
This file contains hidden or 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
| CREATE TABLE tone_data_temp AS | |
| SELECT file_name, last_update, category, word_count, litigious, | |
| positive, uncertainty, negative, modal_strong, modal_weak | |
| FROM bgt.tone_data; | |
| DROP TABLE bgt.tone_data; | |
| ALTER TABLE tone_data_temp RENAME TO tone_data; | |
| ALTER TABLE tone_data SET SCHEMA bgt; |
This file contains hidden or 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 'package:flutter/material.dart'; | |
| import 'package:get/get.dart'; | |
| void main() { | |
| runApp(GetMaterialApp(home: Home())); | |
| } | |
| class Home extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |
OlderNewer