Skip to content

Instantly share code, notes, and snippets.

View agustin107's full-sized avatar
πŸ‡¦πŸ‡·
Working on a better versions of myself πŸ’ͺ🏽

Agustin N. R. Ramirez agustin107

πŸ‡¦πŸ‡·
Working on a better versions of myself πŸ’ͺ🏽
View GitHub Profile
@t3dotgg
t3dotgg / try-catch.ts
Last active April 16, 2025 02:23
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@plencovich
plencovich / mercadopago-marketplace.md
Last active November 14, 2024 00:05
Breve explicaciΓ³n para poder crear una app en Mercadopago para tener un marketplace

Plenco

Mercadopago Marketplace

Mini tutorial para crear una app de marketplace en mercadopago usando PHP y DX-PHP

Es una ayuda memora en referencia a la excelente informaciΓ³n que estΓ‘ en Mercadopago Developers

CreaciΓ³n de APP y ConexiΓ³n de Usuarios.

// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@markerikson
markerikson / redux-socket-middleware-example.js
Created June 28, 2018 00:37
Redux socket middleware example usage
const createMySocketMiddleware = (url) => {
return storeAPI => {
let socket = createMyWebsocket(url);
socket.on("message", (message) => {
storeAPI.dispatch({
type : "SOCKET_MESSAGE_RECEIVED",
payload : message
});
});
@madcoda
madcoda / App.js
Created May 28, 2017 04:24
React-router v4 multi layout
import React, { Component } from 'react'
import { BrowserRouter as Router, Route, Link, Match, Redirect, Switch } from 'react-router-dom'
import OverviewPage from './page/OverviewPage'
import AccountPage from './page/AccountPage'
/*
Layouts, inline define here for demo purpose
you may want to define in another file instead
*/
@clemlatz
clemlatz / self-signed-ssl-certificate.md
Last active January 3, 2025 23:24
Setup a self-signed SSL certificate with Nginx (server and browser)

1. Configure server: Nginx

Create the certificate:

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt

Create a strong Diffie-Hellman group:

$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@odan
odan / xampp_php7_xdebug.md
Last active April 9, 2025 13:07
Installing Xdebug for XAMPP
@hawkup
hawkup / Install Clojure on Ubuntu.md
Last active June 21, 2017 18:19
Install Clojure on Ubuntu 14.04

Prerequisite

  • Java

Installation

  • download clojure
wget http://repo1.maven.org/maven2/org/clojure/clojure/1.6.0/clojure-1.6.0.zip
@rauchg
rauchg / effective-es6.md
Last active July 11, 2023 09:38
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on: