Skip to content

Instantly share code, notes, and snippets.

View nachodd's full-sized avatar

Ignacio Durand nachodd

  • Expero
  • Rosario, Santa Fé, Argentina
View GitHub Profile
@mvaldesdeleon
mvaldesdeleon / types-as-sets.ts
Created August 1, 2020 18:32
Types as Sets, draft
// Types as Sets, containing Values
// Union and Intersection Types can be thought as unions and intersections of the underlying Sets
// Type Compatibility can be thought of a subset relationship between the underlying Sets
//
// Usual Set concepts apply, such as:
// cardinality (the number of possible values of a given type)
// ø (empty set)
// unions, intersections, subsets, supersets, sums, products
//
// Lets look at some types...
@ElRodrigote
ElRodrigote / Colonia.md
Last active January 19, 2021 23:11
Guía util

Take into account

  • If you go there for a couple of days try to rent a room with AirBNB, is cheaper than hotels and you'll save a lot using the kitchen. Everything is really expensive in Colonia, so eating in a restaurant can be VERY expensive. I can recommend you a guy who is a developer and has an apartment for rent
  • Buy some Uruguayan pesos before going there to have pocket cash. Don't use Argentinean pesos because they will take advantage of you. Don't buy uruguayan pesos in Colonia, do it in Argentina before traveling
  • Don't withdraw Uruguayan pesos the ATM, do dollars and then if you need pesos you can sell dollars which will be much cheaper
  • Not every business will accept the Payoneer card, but those who do, you need to tell them is a prepaid or debit card. You'll be asked to enter your PIN
  • Ferries: Colonia Express is the cheapest, but their service is not as good as Buquebus. If you chose to do Buquebus buy your tickets in Seacat instead of doing it directly in BuqueBus
  • If you go for the day
@nachodd
nachodd / request.js
Created November 19, 2019 17:57
Axios instance creation, with request and response handling (managing auth header and error responses). (vue.js project)
/* eslint-disable no-unreachable */
/* eslint-disable require-atomic-updates */
// import _ from "lodash"; // LODASH is imported and used globally, configured in webpack
import axios from "axios"
import store from "store" // store is the Vuex store instance
import router from "router" // router is the Vue Router instance
import { warn, warnDialogParse } from "utils/alerts" // helpers to show alerts and error messages
// create an axios instance
@Akryum
Akryum / FileExplorer.vue
Last active November 25, 2019 18:29
Example of migration to Vue Function-based Component API
<script>
import { isValidMultiName } from '@/util/folders'
import FOLDER_CURRENT from '@/graphql/folder/folderCurrent.gql'
import FOLDERS_FAVORITE from '@/graphql/folder/foldersFavorite.gql'
import FOLDER_OPEN from '@/graphql/folder/folderOpen.gql'
import FOLDER_OPEN_PARENT from '@/graphql/folder/folderOpenParent.gql'
import FOLDER_SET_FAVORITE from '@/graphql/folder/folderSetFavorite.gql'
import PROJECT_CWD_RESET from '@/graphql/project/projectCwdReset.gql'
import FOLDER_CREATE from '@/graphql/folder/folderCreate.gql'
@xeptore
xeptore / fp.md
Last active April 21, 2020 22:54
my fp learning tips and quick recaps

FP Tips and Quick Recaps

Currying

const add = (x) => (y) => x + y;
const addTen = add(10);
const incerement = add(1)

console.log(addTen(4)); // 14
console.log(incremenet(5)); // 6
@robsontenorio
robsontenorio / auth-refresh-token.js
Last active February 3, 2023 14:02
[OAUTH2][KEYCLOAK] Auto refresh token for @nuxtjs/auth module
const strategy = 'keycloak'
export default function ({ app }) {
const { $axios, $auth } = app
if (!$auth.loggedIn || !$auth.strategies[strategy])
return
const options = $auth.strategies.keycloak.options
let child = require("child_process")
let source_map = require("source-map")
let SourceMapConsumer = source_map.SourceMapConsumer
let path = require("path")
var crypto = require('crypto');
module.exports = function(source, sourceMap) {
this.cacheable()
this.async()
var self = this
@autumnwoodberry
autumnwoodberry / user.js
Last active March 24, 2022 06:49
vuex + vuelidate
import Vue from 'vue'
import { validationMixin } from 'vuelidate'
import { required, minLength } from 'vuelidate/lib/validators'
export default function (store) {
const validator = new Vue({
mixins: [
validationMixin
],
computed: {
@rolinger
rolinger / gist:d6500d65128db95f004041c2b636753a
Last active April 2, 2024 03:54
PHP => FCM Push notification tutorial for Android and iOS
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be
retired.
## THE BELOW METHOD IS THE NEWER FCM METHOD:
Register your app in the FCM Console: https://console.firebase.google.com (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
@nightscape
nightscape / Example.java
Created October 21, 2016 19:59
Simple RxJava-based adapter for an Android RecyclerView
public class ReactiveTextViewHolder<T> extends ReactiveViewHolder<T> {
private TextView label;
private T currentItem;
public ReactiveTextViewHolder(View itemView) {
super(itemView);
label = (TextView) itemView.findViewById(android.R.id.text1);
}