Skip to content

Instantly share code, notes, and snippets.

View nombrekeff's full-sized avatar
🤘
Working on Cardboard

Manolo Edge nombrekeff

🤘
Working on Cardboard
View GitHub Profile
@nombrekeff
nombrekeff / git-reverse-commit.sh
Created January 23, 2020 09:47
[Git reverse last commit]
git checkout Branch1
git reset --hard HEAD~1
@nombrekeff
nombrekeff / docker-stopall.sh
Last active February 11, 2020 09:28
[docker stop all] stop or kill all containers #docker
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@nombrekeff
nombrekeff / ghowda.meta
Last active February 8, 2020 22:14
This is a test ghowda blog (javascript, demo)
{
"labels": ["test", "javascript"],
"title": "Blog 1"
}
@nombrekeff
nombrekeff / shebang, linux, bash,
Created February 10, 2020 14:49
[bash sebang] #!/bin/bash
#!/bin/bash
@nombrekeff
nombrekeff / advanced-ts-2.md
Last active February 11, 2020 11:29
Gist for "Advanced TypeScript Exercises - Question 2"

PD: I don't know if it's the correct answer, but it's what I would of done :)

I think it fails because we always expect the output type to be equal to the generic type, although we always return a User.

Typescript tells us that if we pass in a generic type, for example:

createCustomer<{  id: number, kind: string, other: number }>({ 
  id: 1, 
  kind: 'customer' 
});
@nombrekeff
nombrekeff / FlutterLocalization.dart
Created March 27, 2020 12:24
A couple of classes for managing Translations in flutter, from json, with interpolation.
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
class AppLocalizations {
final Locale locale;
AppLocalizations(this.locale);
// Helper method to keep the code in the widgets concise