Skip to content

Instantly share code, notes, and snippets.

Adolfo Builes abuiles

Block or report user

Report or block abuiles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View generated.ex
defmodule do
@moduledoc """
Automatically generated on 2019-11-15T09:08:26-05:00
DO NOT EDIT or your changes may be overwritten
Target implementation: exdr at https://hex.pm/packages/exdr
"""
use XDR.Base
View bytes.txt
+--------+--------+...+--------+--------+...+--------+
| byte 0 | byte 1 |...|byte n-1| 0 |...| 0 | BLOCK
+--------+--------+...+--------+--------+...+--------+
|<-----------n bytes---------->|<------r bytes------>|
|<-----------n+r (where (n+r) mod 4 = 0)>----------->|
View sandbox.js
// Follow the steps below to play with this:
// 1. git clone abuiles/json-xdr && cd json-xdr
// 2. yarn install (or npm install)
// 3. touch sandbox.js
// 4. Paste the content of this file in sandbox.js
// 5. Run like `node sandox`
const XDR = require('js-xdr')
const Cursor = require('cursor')
const jsonXDR = require('./dist/index')
View snake_case_middleware.ex
defmodule Hub.JsonApiClient.Middleware.NormalizeAttributes do
@moduledoc """
JsonApiClient middleware to convert attributes from kebab-case to snake_case.
"""
@behaviour JsonApiClient.Middleware
alias JsonApiClient.{Request}
@impl JsonApiClient.Middleware
View nested.ex
@doc """
Parse notifications from any of the supported banks to a YNAB
transaction.
## Examples
iex> notification = \"""
Apreciado(a) X:
Le informamos que se ha registrado el siguiente movimiento de su Tarjeta Crédito terminada en ****2020:
View notification.txt
Apreciado(a) X:
Le informamos que se ha registrado el siguiente movimiento de su Tarjeta Crédito terminada en ****2020:
Fecha: 2018/11/23
Hora: 15:33:30
Valor Transacción: 18,000
Clase de Movimiento: Compra
Respuesta: Aprobado(a)
Lugar de Transacción: CAFE SAN ALBERTO MUSE0
View docker-compose.yml
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.0
ports:
- 9200:9200
environment:
- xpack.security.enabled=false
View jad.js
import { JsonApiDataStore } from 'jsonapi-datastore';
let store = new JsonApiDataStore();
async function loadData() {
const deliveryAreas = await store.findAll('deliveryArea');
}
loadData()
You can’t perform that action at this time.