Skip to content

Instantly share code, notes, and snippets.

View jairoFernandez's full-sized avatar
🙃
creating....

Jairo Fernández jairoFernandez

🙃
creating....
View GitHub Profile
@jairoFernandez
jairoFernandez / TodoApp-Redux.js
Created August 4, 2018 21:32
Implementación de un TodoApp con redux, sin reactjs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Todo app</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.0/redux.min.js"></script>
</head>
@jairoFernandez
jairoFernandez / REINCIAR_EXPLORADOR.bat
Created August 17, 2018 15:15
Reinicia el explorador...
@ECHO OFF
@ECHO.
echo ===============================================
echo SINCOSOFT
echo ============ Reiniciado explorador ============
@ECHO.
taskkill.exe /F /IM explorer.exe
@ECHO.
CALL :ReiniciarExplorador && (
require 'rdl'
extend RDL::Annotate
x = [1,2,3,6]
class Maybe
attr_accessor :data
end
class Just < Maybe
#!/usr/bin/env bash
echo "Assistance of installations for devs"
PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Option 1")
echo "you chose choice 1"
@jairoFernandez
jairoFernandez / version.dart
Created August 11, 2020 17:28
Read pubspec.yaml
import 'dart:io';
import 'package:path/path.dart';
import 'package:yaml/yaml.dart';
Map<String, String> getVersion() {
final pathToYaml =
join(dirname(Platform.script.toFilePath()), '../../pubspec.yaml');
final f = File(pathToYaml);
final yamlText = f.readAsStringSync();
const any from 'any-library';
@jairoFernandez
jairoFernandez / creator_functions.dart
Last active December 15, 2020 17:41
Creator Functions
createProducts(int quantity) {
final data = [];
for (var i = 0; i < quantity; i++) {
data.add({"id": i, "name": "name $i", "user": rng.nextInt(quantity - 1)});
}
return data;
}
createUsers(int quantity) {
final data = [];
badCombinatorFunction(List<dynamic> products, List<dynamic> users) {
final data = [];
for (var i = 0; i < products.length; i++) {
final user = users.firstWhere((u) => u['id'] == products[i]['user']);
data.add({
"id": products[i]['id'],
"name": products[i]['name'],
"user": user,
});
Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine: Type: Laptop System: ASUSTeK product: N751JK v: 1.0 serial: <superuser/root required>
Mobo: ASUSTeK model: N751JK
CPU: Topology: Quad Core model: Intel Core i7-4710HQ bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 2503 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 2494 2: 2494 3: 2494 4: 2494 5: 2495 6: 2495 7: 2497
8: 2495
Graphics: Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915 v: kernel
Device-2: NVIDIA GM107M [GeForce GTX 850M] driver: nouveau v: kernel
Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa
resolution: 1920x1080~60Hz, 1920x1080~60Hz, 1600x900~60Hz
indexerListUser(List<dynamic> users) {
final data = [];
for (var i = 0; i < users.length; i++) {
data.add({users[i]['id']: users[i]});
}
return data;
}