Skip to content

Instantly share code, notes, and snippets.

View jdnichollsc's full-sized avatar
🏠
Working from home

J.D Nicholls jdnichollsc

🏠
Working from home
View GitHub Profile
@jdnichollsc
jdnichollsc / record-audio.ts
Last active July 17, 2021 05:18
Record audio (Cordova/Ionic) using cordova-plugin-media and cordova-plugin-file
import { Media, MediaObject } from '@ionic-native/media';
import { File as NativeFile, FileEntry } from '@ionic-native/file';
import { delay, getBlobFromFileEntry } from './utils'
// Detect platform device and select extension (Cordova platform, etc)
// Android
const AUDIO_EXTENSION = '.mp3'
// iOS
const AUDIO_EXTENSION = '.m4a'
@jdnichollsc
jdnichollsc / async.js
Last active June 8, 2021 00:48
Angular mapSeries like Bluebird.js
(function () {
'use strict';
angular
.module('App')
.factory('Async', Async);
Async.$inject = ['$q'];
function Async($q) {
return {
@jdnichollsc
jdnichollsc / models-user.js
Last active March 19, 2021 08:10
Search users with fullname in MongoDB using Mongoosejs and Aggregation Framework in Node.js
var mongoose = require('mongoose');
var validate = require('mongoose-validator');
var Schema = mongoose.Schema;
var crypto = require('crypto');
var utilities = require('../services/utilities');
var userSchema = new Schema({
firstname: { type : String, trim : true },
lastname: { type : String, trim : true },
username: { type: String, required: true, unique: true, lowercase: true, trim : true, index : true },
@jdnichollsc
jdnichollsc / ABC.md
Last active February 5, 2021 14:42
English is a work in progress

Useful Phrases

Clarification

  • What does that mean?
  • How does it work?
  • How long does it take?
  • Could you say that again, please?

Collaboration

  • When will the next meeting be?
@jdnichollsc
jdnichollsc / API REST de facturación
Last active July 21, 2020 11:30
Especialista en tecnologías Open Source sobre Microsoft Azure
* Billing REST API
Las operaciones se ajustan a la especificación del protocolo HTTP/1.1
Cada operación devuelve un encabezado x-ms-request-id
Azure Active Directory para la autenticación (El usuario debe ser miembro del rol propietario, colaborador o Lector)
Permiten consultar para las categorías:
- Uso de recursos
- RateCard de recursos (Obtener info de precios y metadatos de recursos de una suscripción de Azure)
@jdnichollsc
jdnichollsc / README.md
Last active June 8, 2020 06:41
React Native plugin for Mercado Pago (Mobile Checkout)

MercadoPago for React Native (Android & iOS)

A native bridge to use Mercado Pago SDK V4 with React Native.

import MercadoPago from 'react-native-mercado-pago';

async startPayment() {
  try {
    const publicKey = 'TEST-dc0b51e0-0eb7-47ce-b145-5585a0189eb0';
 const preferenceId = '113196323-082708db-09c3-4c7d-a65a-727e237c76e0';
@jdnichollsc
jdnichollsc / ROADMAP.md
Last active May 23, 2020 21:20
Proyecto 26's YouTube channel - https://youtube.com/proyecto26

TODO

  • Inicio, qué es Proyecto 26?
  • Dibujando en WebGL/Canvas (IonPhaser)
  • Animaciones en React Native (Newbies)
  • SQLite en mobile (Ionic, React Native, etc)
  • Code sharing (Ionic, NativeScript) for Web, PWA, Mobile
  • Requests HTTP en Unity (RestClient)
  • REST APIs para juegos
  • Requests http, observables, cancelación, etc